I'm using MSVC++ to program a simple window, and I included a resource file for a menu along the lines of:
MYMENU MENU DISCARDABLE
//etc.
and I created a header file "resourcedef.h" with definitions like
#define ID_MYMENU_FILE_CLOSE 1002
I can include it in my main.cpp file without error, however, when I include it in the resource file, I get the error
.\resourcedef.h(9) : fatal error RC1004: unexpected end of file found
(resourcedef.h is exactly 9 lines long). When I add a newline the the end of the .h,
//lines 1 - 8
#define ID_MYMENU_FILE_OPEN 1001
So that there is a tenth blank line (that doesn't appear on SO), it compiles fine. If I put anything on the tenth line, even a comment, the compiler gives me an error. Does anyone know what causes this and how I can fix it?