'Foo' cannot be used as a function

From Cppsyntax

Jump to: navigation, search

You can get the error

'Foo' cannot be used as a function

if you declared a variable with the same name somewhere. (Note that this is also valid for library functions, e.g. localtime() )

WRONG

string Foo;  //this var has the same name as some function!
bool result = Foo();

RIGHT

string Foo_string;
bool result = Foo();