syntax when converting from c to c++

  • Thread starter Thread starter Boyd1
  • Start date Start date
B

Boyd1

Guest
I have the following that works ok in c:

BOOL (*PairValidationFn)(HWND, float, float );

INPUT_STATUS Input_FID_Address( HWND hWnd, LPSTR value )
{
PairValidationFn = FID_IntPair_Validate;
.....
}


BOOL FID_IntPair_Validate( HWND hDlg, int fidValue, int pointValue )
{
....
}


but in c++ I get the following error:

INTPAIR.cpp(97): error C2440: = : cannot convert from BOOL (__cdecl *)(HWND,int,int) to BOOL (__cdecl *)(void)
This conversion requires a reinterpret_cast, a C-style cast or function-style cast


To say the least, I do not understand the error message.


Please advise as to the correct syntax for the assign statement.


Boyd








BDM

Continue reading...
 
Back
Top