Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I cann't create a class!!! Unexpected end of file error

Status
Not open for further replies.

jvff

Programmer
Apr 1, 2001
64
BR
I've tried to create so many classes like CBitmapFile CBlock but all of them present compiler error: Unexpected end of file while looking for precompiled header directive. Please help... ThanQ, ;-)

JVFF (Janito Vaqueiro Ferreira Filho)
 
Hi

This may be due to a small problem in your projet settings.

Select 'Project | Settings'
Select the tab 'C/C++'
Select the combo item 'Precompiled Headers'
Select the radio 'Use Precompiled Header files'
Set the 'Through header' as 'stdafx.h'

Recompile All the project

If it does not work, try the radio 'Not using precompiled headers' to check for other error.

Tell us if it works ...

Thierry
EMail: Thierry.Marneffe@swing.be
 
I selected not using precompiled headers and included StdAfx.h to MyClass.h and it says no such file or directory such as StdAfx.h ThanQ, ;-)

JVFF (Janito Vaqueiro Ferreira Filho)
 
Hello ,

try to put an ; at the end of the class definition like

class myClass
{
attribute1;
public:
method1();
method2();
method3();
}; <- this is the point.

go to the project settings>c/c++>precompiled headers and mark automatic use of precompiled headers

Thor da Silva
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top