?
Solved

unexpected end of file while looking for precompiled header directive

Posted on 2003-02-21
3
Medium Priority
?
309 Views
Last Modified: 2011-04-14
I am new to Visual C++ and would like to learn it by compiling and running some simple codes found on the Internet.  Of the two examples that I have tried, I get the following fatal error upon building the exe file: "unexpected end of file while looking for precompiled header directive".  What does this mean and what should I do?
0
Comment
Question by:glenisle
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 9

Accepted Solution

by:
Priyesh earned 200 total points
ID: 7997484
this means you have to put in the line

#include "stdafx.h" as the first line of your .cpp file

0
 

Expert Comment

by:alexanderthegreat
ID: 7999351
Try a couple of these } on the end of the file.
Should you not buy a book instead of compiling whatever
you find on the net, there are a lot of bad people out their.
0
 

Author Comment

by:glenisle
ID: 8000689
Simple, Thanks.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question