Too many arguments?

I am writing just a basic keylogger for practice in C++ and such. I don't get any errors except this one:

Too many arguments to function 'BOOL FreeConsole()'

The code section is:

1
2
3
4
5
using namespace std;
int main () {
    string log;
    FreeConsole(true);
    while(true){


Help?
You'll find the prototype is BOOL FreeConsole(void);

This means FreeConsole is a function that takes no parameters and returns a BOOL. So the call should be:
1
2
3
4
5
int main()
{
    FreeConsole();  // no parameters, ignore return
    return 0;
}
Last edited on
Topic archived. No new replies allowed.