 |
C++Talk.NET C++ language newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Mark Thomas Guest
|
Posted: Fri Oct 24, 2003 9:27 pm Post subject: Baffled! |
|
|
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
|
Posted: Fri Oct 24, 2003 10:33 pm Post subject: Re: [OT, redir] Baffled! |
|
|
"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
|
Posted: Fri Oct 24, 2003 10:45 pm Post subject: Re: Baffled! |
|
|
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
|
Posted: Fri Oct 24, 2003 11:53 pm Post subject: Re: Baffled! |
|
|
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
|
Posted: Sat Oct 25, 2003 12:44 am Post subject: Re: Baffled! |
|
|
| 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 |
|
 |
Powered by phpBB © 2001, 2006 phpBB Group
|