C++Talk.NET Forum Index C++Talk.NET
C++ language newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Baffled!

 
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language (comp.lang.c++)
View previous topic :: View next topic  
Author Message
Mark Thomas
Guest





PostPosted: Fri Oct 24, 2003 9:27 pm    Post subject: Baffled! Reply with quote



Hi
I do not understand why the following does not compile under Visual C++
7.1. It is just a simple "Hello, World" program.

// Hello World Application. Why does this fail?

#include <iostream>

using namespace std;

int main(int argc, char* argv[])

{

cout<<"Hello World"<
return 0;

}

MyFirstConsolApp.cpp(11) : fatal error C1010: unexpected end of file while
looking for precompiled header directive


Back to top
Mike Wahler
Guest





PostPosted: Fri Oct 24, 2003 10:33 pm    Post subject: Re: [OT, redir] Baffled! Reply with quote




"Mark Thomas" <thomamdremove (AT) nterlynx (DOT) net> wrote

Quote:
Hi
I do not understand why the following does not compile under Visual
C++
7.1. It is just a simple "Hello, World" program.

// Hello World Application. Why does this fail?

#include
using namespace std;

int main(int argc, char* argv[])

{

cout<<"Hello World"<
return 0;

}

MyFirstConsolApp.cpp(11) : fatal error C1010: unexpected end of file while
looking for precompiled header directive

This is not a language problem, but one with your IDE.
Look around the menus for 'Use Precompiled Headers' and
turn them off (learn about if, how and when to use them later --
see the help files). Further questions about the Visual C++ IDE
should go to newsgroup microsoft.public.vc.ide_general

Your code looks fine to me.

-Mike



Back to top
MPBroida
Guest





PostPosted: Fri Oct 24, 2003 10:45 pm    Post subject: Re: Baffled! Reply with quote



Mark Thomas wrote:
Quote:

Hi
I do not understand why the following does not compile under Visual C++
7.1. It is just a simple "Hello, World" program.

// Hello World Application. Why does this fail?

#include
using namespace std;

int main(int argc, char* argv[])
{
cout<<"Hello World"< return 0;
}

MyFirstConsolApp.cpp(11) : fatal error C1010: unexpected end of file while
looking for precompiled header directive

Try changing your project settings to "No Precompiled Headers".

Mike

Back to top
Mark Thomas
Guest





PostPosted: Fri Oct 24, 2003 11:53 pm    Post subject: Re: Baffled! Reply with quote

Thanks guys. I found a setting and turned it off. Now my programs work.
Pretty sad when the first learning demo in the book will not compile.

I have tried to find a Visual C++ newsgroup, but all I found was
microsoft.public.USASalesInfo.Developer.C++
Maybe there are groups that my ISP does not carry. Sorry for the OT but I
was baffled.


"MPBroida" <michael.p.broida (AT) boeing_oops (DOT) com> wrote

Quote:
Mark Thomas wrote:

Hi
I do not understand why the following does not compile under Visual
C++
7.1. It is just a simple "Hello, World" program.

// Hello World Application. Why does this fail?

#include
using namespace std;

int main(int argc, char* argv[])
{
cout<<"Hello World"< return 0;
}

MyFirstConsolApp.cpp(11) : fatal error C1010: unexpected end of file
while
looking for precompiled header directive

Try changing your project settings to "No Precompiled Headers".

Mike



Back to top
Jonathan Mcdougall
Guest





PostPosted: Sat Oct 25, 2003 12:44 am    Post subject: Re: Baffled! Reply with quote

Quote:

MyFirstConsolApp.cpp(11) : fatal error C1010: unexpected end of
file while looking for precompiled header directive

Try changing your project settings to "No Precompiled Headers".

Thanks guys. I found a setting and turned it off. Now my programs
work. Pretty sad when the first learning demo in the book will not
compile.

I have tried to find a Visual C++ newsgroup, but all I found was
microsoft.public.USASalesInfo.Developer.C++
Maybe there are groups that my ISP does not carry. Sorry for the OT
but I was baffled.


Please do not top post

http://www.parashift.com/c++-faq-lite/how-to-post.html#faq-5.4


Try msnews.microsoft.com, they have got plenty of newsgroups.


Jonathan




Back to top
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language (comp.lang.c++) All times are GMT
Page 1 of 1

 
 


Powered by phpBB © 2001, 2006 phpBB Group