'{': no matching toke found error visual studio

rqscaltt 21 Reputation points
2021-03-13T00:59:55.59+00:00

hey i'm new to coding i have a error that i can't fix. i don't know where to put the forgotten { can someone help me please. it says in line 50 that is at writeprocessmemory line

template<typename T> T RPM(SIZE_T adress) {
T buffer;
ReadProcessMemory(hProcess, (LPVOID)adress, &buffer, sizeof(T), NULL);
return buffer;
}
template<typename T> void WPM(SIZE_T address, T buffer) {
WriteProcessMemory(hProcess, (LPVOID)adress, &buffer, sizeof(buffer, NULL);
}

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,513 questions
0 comments No comments
{count} votes

Accepted answer
  1. Igor Tandetnik 1,106 Reputation points
    2021-03-13T04:10:21.323+00:00

    The error message is misleading - you have fewer closing parens ) than opening ones (. I imagine sizeof(buffer, NULL) was meant to be sizeof(buffer), NULL)


0 additional answers

Sort by: Most helpful