• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Can anyone help me figure out this cryptic error?

slugg

Diamond Member
Here's my typedef:
typedef int (*MouseCallback)(const Position &);


Line that I get the error:
windowList.back()->SetMouseClickCallback(graphicsList.back()->mouseClick);


The error:
: error C2664: 'SetMouseClickCallback' : cannot convert parameter 1 from 'int (const class Position &)' to 'int (__cdecl *)(const class Position &)'
None of the functions with this name in scope match the target type



^^ What? LOL! I really don't understand what that error means. Anyone have any idea?

Thanks for looking 🙂
 
You need to change your callback function prototype to either

typedef int (WINAPI *MouseCallback)(const Position &); or
typedef int (__cdecl *MouseCallback)(const Position &);

 
Back
Top