GIDForums  

Go Back   GIDForums > Computer Programming Forums > MS Visual C++ / MFC Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 11-Mar-2006, 04:12
coder coder is offline
New Member
 
Join Date: Jan 2006
Posts: 19
coder is on a distinguished road

syntax errors in document


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.
 
 

Recent GIDBlogMeeting the populace by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Winsock error when compiling FLTK 2.0 Projects mauriciorossi FLTK Forum 3 16-Aug-2005 10:18
Help with syntax errors PeteGallo C Programming Language 7 08-Aug-2005 20:30
C++ PhoneBook marita C++ Forum 46 12-Jun-2005 12:10
syntax error ??? crq C++ Forum 2 23-Jan-2005 16:57
Hmm what seems to be the problem here? error C2061: syntax error pablowablo C++ Forum 5 12-Jun-2004 22:11

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 06:20.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.