I'm not sure if this should be posted in the beginners forum, but I'll take my chances.
I'm currently messing around with DarkGDK and I get an error I do not understand.
The error is
"C2446: '!=' : no conversion from 'int' to 'int (__cdecl *)(void)'" and the code at that line is
for(; dbGetFileType != -1; nAmountOfFiles++)
where "dbGetFileType" returns an integer.
I couldn't find understandable information on where the "(__cdecl *)(void)" part in the error comes from. So my question is: what does it mean (and why does this line not work) and why does the compiler see '-1' as a different type than an int here?
int (__cdecl *)(void) is the type of dbGetFileType. It means that dbGetFileType is a
function that takes no arguments, returns an int and follows the __cdecl calling convention.