Hi
I have one opensource of vc++. While executing this code it is giving the following errors.
1)error C2433: 'HWND' : 'inline' not permitted on data declarations
2)error C2143: syntax error : missing ';' before '{'
3)error C2447: '{' : missing function header (old-style formal list )
4)error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
5)error C2086: 'int CALLBACK' : redefinition
If any one got these errors and knew the solution please let me know.
Thank You
angle
I have one opensource of vc++. While executing this code it is giving the following errors.
1)error C2433: 'HWND' : 'inline' not permitted on data declarations
2)error C2143: syntax error : missing ';' before '{'
3)error C2447: '{' : missing function header (old-style formal list )
4)error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
5)error C2086: 'int CALLBACK' : redefinition
If any one got these errors and knew the solution please let me know.
Thank You
angle

errors while executing vc++ code
GoDaddy
Here I am posting the errors and the code where i am getting these errors with line no.
1) Error 1 error C2146: syntax error : missing ';' before identifier 'HwndMSWheel' c:\program files\microsoft visual studio 8\vc\platformsdk\include\zmouse.h 141
2)Error 2 error C2433: 'HWND' : 'inline' not permitted on data declarations c:\program files\microsoft visual studio 8\vc\platformsdk\include\zmouse.h 141
3)Error 3 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\program files\microsoft visual studio 8\vc\platformsdk\include\zmouse.h 141
4)Error 4 error C2065: 'PUINT' : undeclared identifier c:\program files\microsoft visual studio 8\vc\platformsdk\include\zmouse.h 142
5)Error 5 error C2146: syntax error : missing ')' before identifier 'puiMsh_MsgMouseWheel' c:\program files\microsoft visual studio 8\vc\platformsdk\include\zmouse.h 142
6)Error 6 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\program files\microsoft visual studio 8\vc\platformsdk\include\zmouse.h 142
7)Error 7 error C2059: syntax error : ')' c:\program files\microsoft visual studio 8\vc\platformsdk\include\zmouse.h 146
8)Error 8 error C2143: syntax error : missing ';' before '{' c:\program files\microsoft visual studio 8\vc\platformsdk\include\zmouse.h 148
9)Error 9 error C2447: '{' : missing function header (old-style formal list ) c:\program files\microsoft visual studio 8\vc\platformsdk\include\zmouse.h 148
The code is:
Line.No
__inline
HWND HwndMSWheel( (141)PUINT puiMsh_MsgMouseWheel, (142)
PUINT puiMsh_Msg3DSupport,
PUINT puiMsh_MsgScrollLines,
PBOOL pf3DSupport,
PINT piScrollLines) (146)
{ (148)
HWND hdlMsWheel;
hdlMsWheel = FindWindow(MSH_WHEELMODULE_CLASS, MSH_WHEELMODULE_TITLE);
*puiMsh_MsgMouseWheel = RegisterWindowMessage(MSH_MOUSEWHEEL);
*puiMsh_Msg3DSupport = RegisterWindowMessage(MSH_WHEELSUPPORT);
*puiMsh_MsgScrollLines = RegisterWindowMessage(MSH_SCROLL_LINES);
if (*puiMsh_Msg3DSupport)*pf3DSupport = (BOOL)SendMessage(hdlMsWheel, *puiMsh_Msg3DSupport, 0, 0);
else*pf3DSupport = FALSE;
// default to FALSE if (*puiMsh_MsgScrollLines)*piScrollLines = (
int)SendMessage(hdlMsWheel, *puiMsh_MsgScrollLines, 0, 0); else*piScrollLines = 3;
// default return(hdlMsWheel);}
I think this will be helpful in giving suggestions and modifications.
Thanku
M.A.D.
If you include the code that you are trying to compile it's much easier to tell you what is wrong with it.
Are you using the 'inline' modifier on any data declarations in your code
Toky
Raggers
It's not the only situation that the compiler report this error. if the return type is specified in a function, but the type is undefined, the compiler will report this error either.
CoolBhatt
MarkEllis
It tells that there's some data type is undeclared
did you include windows.h the HWND and CALLBACK are defined in that file.
Zimdog
What I can tell you is that this error
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
specifies that a function does not have a return type (which unfortunatelly, in some cases compiles win previous versions of the compiler, 6.0. 7.x).