include file error
-
Hi,guys.I have a question to ask,anyone could help? In VC++ 6 ,I build a SDI program,and add a dialog class used ClassWizard. In the dialog class CPP file,I include the file of the view.
/#include "hotel_misview.h"
then complied this project ,the complier gave me the message follow:i:\microsoft visual studio\myprojects\database\hotel_mis\hotel_misview.h(21) : error C2143: syntax error : missing ';' before '*' i:\microsoft visual studio\myprojects\database\hotel_mis\hotel_misview.h(21) : error C2501: 'CHotel_MISDoc' : missing storage-class or type specifiers i:\microsoft visual studio\myprojects\database\hotel_mis\hotel_misview.h(21) : error C2501: 'GetDocument' : missing storage-class or type specifiers
could anyone tell me why?Thanks a lot. =============== YES, I am here. =============== -
Hi,guys.I have a question to ask,anyone could help? In VC++ 6 ,I build a SDI program,and add a dialog class used ClassWizard. In the dialog class CPP file,I include the file of the view.
/#include "hotel_misview.h"
then complied this project ,the complier gave me the message follow:i:\microsoft visual studio\myprojects\database\hotel_mis\hotel_misview.h(21) : error C2143: syntax error : missing ';' before '*' i:\microsoft visual studio\myprojects\database\hotel_mis\hotel_misview.h(21) : error C2501: 'CHotel_MISDoc' : missing storage-class or type specifiers i:\microsoft visual studio\myprojects\database\hotel_mis\hotel_misview.h(21) : error C2501: 'GetDocument' : missing storage-class or type specifiers
could anyone tell me why?Thanks a lot. =============== YES, I am here. =============== -
/#include "hotel_misview.h" If this is how you wrote it in your code too, you better remove the "/" before the #define preprocessor.
-
Hi,guys.I have a question to ask,anyone could help? In VC++ 6 ,I build a SDI program,and add a dialog class used ClassWizard. In the dialog class CPP file,I include the file of the view.
/#include "hotel_misview.h"
then complied this project ,the complier gave me the message follow:i:\microsoft visual studio\myprojects\database\hotel_mis\hotel_misview.h(21) : error C2143: syntax error : missing ';' before '*' i:\microsoft visual studio\myprojects\database\hotel_mis\hotel_misview.h(21) : error C2501: 'CHotel_MISDoc' : missing storage-class or type specifiers i:\microsoft visual studio\myprojects\database\hotel_mis\hotel_misview.h(21) : error C2501: 'GetDocument' : missing storage-class or type specifiers
could anyone tell me why?Thanks a lot. =============== YES, I am here. ===============You need to
#include
the .h file that declares your document class inhotel_misview.h
, prior to the first reference toCHotel_MISDoc
.
Software Zen:
delete this;