Solved

Unable to compile a cpp file

Posted on 1998-10-19
3
243 Views
Last Modified: 2010-04-02
Hi,
I kept on receiving this error message when I try to compile my CPP file "fatal error C1010: unexpected end of file while looking for precompiled header directive". This still happens when I try to clean the directory and recompile all files. I am thus unable to build an executable.
0
Comment
Question by:wmlim060298
  • 2
3 Comments
 
LVL 6

Accepted Solution

by:
thresher_shark earned 30 total points
Comment Utility
Add:

#include "stdafx.h"

to the top of the source file having this difficulty.

If you have any further questions regarding this issue, please feel free to ask.  Thanks!
0
 

Author Comment

by:wmlim060298
Comment Utility
Thanks ! I actually tried to include this header just before your answer came.
0
 
LVL 6

Expert Comment

by:thresher_shark
Comment Utility
Glad it all worked out!

Just out of curiousity, why'd you give me a 'B' then?  I just want to try to improve my answers for in the future.  Thanks!
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
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 be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

728 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now