0

I'm a bit confused on how the precompiled header system works. I'm using Visual Studio 2005 and when trying to include multiple .cpp files in a project, they each, on compile, give me an unexpected end of file error. I have them all set to precompile a header, stdafx.h, and I'm not really sure how to get rid of that error.

Without those two .cpp files my program runs fine (with only my main .cpp file), but after including those (and adding the #include "stdafx.h" line to the top of each file) they both give me unexpected end of file errors. I'm sure this is pretty common, and an easy fix. Just wondering about how I can fix it, thanks!

2
Contributors
2
Replies
4
Views
10 Years
Discussion Span
Last Post by Mr Violent
0

Goto project settings and turn off precompiled headers would be my suggestion.

For a feature which is supposed to improve productivity, it sure provokes an awful lot of questions from all sections of the community.

0

Yeah, I tried turning off precompiled headers but its still giving me problems. I've recently tried using Dev-C++ and it's much easier to work in than VC++.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.