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!

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.

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++.