'.c' vs '.cpp'
Posted on 1998-04-18
I have a program called 'app.c' that opens a dialog box. However when I rename the file to 'app.cpp' I get an error.
The line that gives the error is:
DialogBox ( hinstance, "SelWND", hwnd, WndDialogProc) ;
and the error message is:
error C2664: 'DialogBoxParamA' : cannot convert parameter 4 from 'int (void *,unsigned int,unsigned int,long)' to 'int (__stdcall *)(void)'
Declaration for WndDialogProc is :
BOOL CALLBACK WndDialogProc (HWND, UINT, WPARAM, LPARAM) ;
Why does this error happen? I wanted to use classes/C++ without using MFC.