C++ Error
I am combing some source code for a directdraw class. It compiles except for this one error:
fatal error C1004: unexpected end of file found
I go to the line that it specifies and it is at the end. But what does it mean? What do I do?
Whoa, I post 2 messages and they get duplicated on different threads...
Edited by - Atavist on October 26, 2000 6:02:46 PM
Edited by - Atavist on October 26, 2000 6:02:46 PM
Just because the church was wrong doesn't mean Galileo wasn't a heretic.It just means he was a heretic who was right.
Bad forum! Quit messing with me!
Anyway, your error may be due to:
missing ;
missing }
missing #endif
trust me its there, its probably something silly
Edited by - Atavist on October 26, 2000 6:05:02 PM
Anyway, your error may be due to:
missing ;
missing }
missing #endif
trust me its there, its probably something silly
Edited by - Atavist on October 26, 2000 6:05:02 PM
Just because the church was wrong doesn't mean Galileo wasn't a heretic.It just means he was a heretic who was right.
This could be a bug in MSVC. Have you tried exiting, and restarting? Maybe resetting? Else you can try copy-pasting the source to another file.
Some compilers *cough* VC 5.0 *cough* insist you have whitespace (space, CR, LF) after the last ''}'' in your file. I guess /// would be ok as well. I seem to remember it just hung the compiler though and didn''t give an error.
Wouldn''t it be nice if it clued you on what it was excepting that it didn''t find before it got the EOF?
#include "stdafx.h" needs to be the first line in all .cpp files used with an MFC project. V$ will cough up that error (along with a bunch of others) if it''s not.
#include "stdafx.h" needs to be the first line in all .cpp files used with an MFC project. V$ will cough up that error (along with a bunch of others) if it''s not.
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
quote: Some compilers *cough* VC 5.0 *cough* insist you have whitespace (space, CR, LF) after the last ''}'' in your file.
What the HELL are talking about? Thats not true at all! I just compiled a file in MSVC 5 as i read your post, no whitespace or anything after the closing }, and it worked. Must just have been your copy.
Unexpected end of file means that you either didn''t close in one of your functions with a }, didn''t finish a line with a ;, or didn''t match an #ifdef, etc., with an #endif. So just go and fix it.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement