943,833 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 2282
  • C++ RSS
Jul 28th, 2008
0

GUI: 3 C:\Dev-Cpp\lolLOLlol.cpp expected `,' or `;' before numeric constant

Expand Post »
Hey. The title displays the error and i was just wondering how i could fix it. Thanks!

C++ Syntax (Toggle Plain Text)
  1. #include "resource.h"
  2.  
  3. IDR_MYMENU MENU
  4. BEGIN
  5. POPUP "&File"
  6. BEGIN
  7. MENUITEM "E&xit", ID_FILE_EXIT
  8. END
  9.  
  10. POPUP "&Stuff"
  11. BEGIN
  12. MENUITEM "&Go", ID_STUFF_GO
  13. MENUITEM "G&o somewhere else", 0, GRAYED
  14. END
  15. END
  16.  
  17. IDI_MYICON ICON "menu_one.ico"
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Code Shark is offline Offline
14 posts
since Jul 2008
Jul 28th, 2008
0

Re: GUI: 3 C:\Dev-Cpp\lolLOLlol.cpp expected `,' or `;' before numeric constant

you forgot a ";" ^^
at what line does it expect but not find?
Reputation Points: 24
Solved Threads: 8
Junior Poster in Training
Tigran is offline Offline
90 posts
since Jun 2008
Jul 28th, 2008
0

Re: GUI: 3 C:\Dev-Cpp\lolLOLlol.cpp expected `,' or `;' before numeric constant

c++ compilers don't know how to compile resource files. Use a resource compiler for that.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2282
Retired and Enjoying Life
Ancient Dragon is online now Online
21,951 posts
since Aug 2005
Jul 28th, 2008
0

Re: GUI: 3 C:\Dev-Cpp\lolLOLlol.cpp expected `,' or `;' before numeric constant

I'm not sure what language that is, but its not C or C++, unless the contents of "resource.h" happen to be an extremely nasty set of macros and #define statements.

If we knew what was inside resource.h. we might be able to give a better answer
Reputation Points: 307
Solved Threads: 62
Posting Pro
Bench is offline Offline
565 posts
since Feb 2006
Jul 28th, 2008
0

Re: GUI: 3 C:\Dev-Cpp\lolLOLlol.cpp expected `,' or `;' before numeric constant

Click to Expand / Collapse  Quote originally posted by Bench ...
I'm not sure what language that is, but its not C or C++, unless the contents of "resource.h" happen to be an extremely nasty set of macros and #define statements.

If we knew what was inside resource.h. we might be able to give a better answer
That is a resource file that defines MS-Window GUI resources such as menu, dialog boxes, etc. resource.h just contains define's for integers that are used in the resource file and elsewhere in the c++ code. Resource files are compiled with resource compilers, not c++ compilers.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2282
Retired and Enjoying Life
Ancient Dragon is online now Online
21,951 posts
since Aug 2005
Jul 29th, 2008
0

Re: GUI: 3 C:\Dev-Cpp\lolLOLlol.cpp expected `,' or `;' before numeric constant

Dev-C++ 4.9.9.2 will compile this. I have done it before. Check your resource.h for any missing semicolons.
Reputation Points: 79
Solved Threads: 6
Posting Whiz in Training
TheBeast32 is offline Offline
236 posts
since Dec 2007
Jul 29th, 2008
-1

Re: GUI: 3 C:\Dev-Cpp\lolLOLlol.cpp expected `,' or `;' before numeric constant

Dev-C++ is not a compiler -- its an IDE that calls other programs to compile the files. And there should be no semicolons in resource.h
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2282
Retired and Enjoying Life
Ancient Dragon is online now Online
21,951 posts
since Aug 2005
Jul 29th, 2008
0

Re: GUI: 3 C:\Dev-Cpp\lolLOLlol.cpp expected `,' or `;' before numeric constant

1. There could be a missing semicolon in resource.h if he didn't use all #define macros, and declared something like "long something" in it. It would look weird, but there still could be one.

2. Take a look. His error is "3 C:\Dev-Cpp\lolLOLlol.cpp expected `,' or `;' before numeric constant". C:\Dev-Cpp\ is Dev-C++'s default installation directory. That must mean he's using it right? Also, I'm not saying that a C++ compiler could do that. I'm just saying that he must have an error in resource.h or something.
Last edited by TheBeast32; Jul 29th, 2008 at 12:54 am.
Reputation Points: 79
Solved Threads: 6
Posting Whiz in Training
TheBeast32 is offline Offline
236 posts
since Dec 2007
Jul 29th, 2008
0

Re: GUI: 3 C:\Dev-Cpp\lolLOLlol.cpp expected `,' or `;' before numeric constant

I will agree that resource.h might contain some crap that the resource compiler doesn't understand. Only the op can know that, and he has posted nothing about it. The *.h file could be just missing the // for start of comment. But since we're just guessing, there is no point discussing this any more.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2282
Retired and Enjoying Life
Ancient Dragon is online now Online
21,951 posts
since Aug 2005
Jul 29th, 2008
0

Re: GUI: 3 C:\Dev-Cpp\lolLOLlol.cpp expected `,' or `;' before numeric constant

Post your resource.h Code Shark, so we can see if there's anything wrong.
Reputation Points: 79
Solved Threads: 6
Posting Whiz in Training
TheBeast32 is offline Offline
236 posts
since Dec 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: printing text file string contents (array) - padded characters
Next Thread in C++ Forum Timeline: problem reading a in reverse order





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC