Hi all,
I added a .cpp and a .h file into my mfc project and in the .h file i should include the header of the project.The name of my project is TraffEdu and i should include TraffEdu.h in my new .h file. Also in the TraffEdu.h there is the TraffEduDoc.h file included. When i compile the project, it gives some syntax errors in the TraffEduDoc.h file, although i did not changed anything in the document file. The errors are:
Code:
c:\Documents and Settings\bahar pamuk\Desktop\TraffEdu\TraffEduDoc.h(22): error C2061: syntax error : identifier 'LPCTSTR'
c:\Documents and Settings\bahar pamuk\Desktop\TraffEdu\TraffEduDoc.h(23): error C2061: syntax error : identifier 'CArchive'
c:\Documents and Settings\bahar pamuk\Desktop\TraffEdu\TraffEduDoc.h(39): error C2143: syntax error : missing ';' before '}'
c:\Documents and Settings\bahar pamuk\Desktop\TraffEdu\TraffEduDoc.h(14): error C2143: syntax error : missing ';' before 'public'
c:\Documents and Settings\bahar pamuk\Desktop\TraffEdu\TraffEduDoc.h(24): error C2146: syntax error : missing ';' before identifier 'GetFileName'
c:\Documents and Settings\bahar pamuk\Desktop\TraffEdu\TraffEduDoc.h(35): error C2146: syntax error : missing ';' before identifier 'm_csFileName'
c:\Documents and Settings\bahar pamuk\Desktop\TraffEdu\TraffEduDoc.h(21): error C2146: syntax error : missing ';' before identifier 'OnNewDocument'
c:\Documents and Settings\bahar pamuk\Desktop\TraffEdu\TraffEduDoc.h(22): error C2146: syntax error : missing ';' before identifier 'OnOpenDocument'
c:\Documents and Settings\bahar pamuk\Desktop\TraffEdu\TraffEduDoc.h(21): error C2433: 'CTraffEduDoc::BOOL' : 'virtual' not permitted on data declarations
c:\Documents and Settings\bahar pamuk\Desktop\TraffEdu\TraffEduDoc.h(22): error C2433: 'CTraffEduDoc::BOOL' : 'virtual' not permitted on data declarations
c:\Documents and Settings\bahar pamuk\Desktop\TraffEdu\TraffEduDoc.h(21): error C2501: 'CTraffEduDoc::BOOL' : missing storage-class or type specifiers
c:\Documents and Settings\bahar pamuk\Desktop\TraffEdu\TraffEduDoc.h(22): error C2501: 'CTraffEduDoc::BOOL' : missing storage-class or type specifiers
c:\Documents and Settings\bahar pamuk\Desktop\TraffEdu\TraffEduDoc.h(24): error C2501: 'CTraffEduDoc::CString' : missing storage-class or type specifiers
c:\Documents and Settings\bahar pamuk\Desktop\TraffEdu\TraffEduDoc.h(35): error C2501: 'CTraffEduDoc::CString' : missing storage-class or type specifiers
c:\Documents and Settings\bahar pamuk\Desktop\TraffEdu\TraffEduDoc.h(35): error C2501: 'CTraffEduDoc::m_csFileName' : missing storage-class or type specifiers
c:\Documents and Settings\bahar pamuk\Desktop\TraffEdu\TraffEduDoc.h(8): error C2504: 'CDocument' : base class undefined
c:\Documents and Settings\bahar pamuk\Desktop\TraffEdu\TraffEdu.h(7): fatal error C1189: #error : include 'stdafx.h' before including this file for PCH
c:\Documents and Settings\bahar pamuk\Desktop\TraffEdu\TraffEduDoc.h(14): warning C4183: 'DECLARE_DYNCREATE': missing return type; assumed to be a member function returning 'int'
c:\Documents and Settings\bahar pamuk\Desktop\TraffEdu\TraffEduDoc.h(39): warning C4183: 'DECLARE_MESSAGE_MAP': missing return type; assumed to be a member function returning 'int'
c:\Documents and Settings\bahar pamuk\Desktop\TraffEdu\TraffEduDoc.h(24): warning C4183: 'GetFileName': missing return type; assumed to be a member function returning 'int'
c:\Documents and Settings\bahar pamuk\Desktop\TraffEdu\TraffEduDoc.h(21): warning C4183: 'OnNewDocument': missing return type; assumed to be a member function returning 'int'
c:\Documents and Settings\bahar pamuk\Desktop\TraffEdu\TraffEduDoc.h(22): warning C4183: 'OnOpenDocument': missing return type; assumed to be a member function returning 'int'
What may the reason of this syntax error. Do you have any idea?
Any suggestion would be appreciated.
Thanks.