I have a sample project (not mine) which is in Visual C++ 6. I\'m trying to convert it to Visual Studio 2008.
The older project is using precompiled headers. Now the
When you compile code, the compiler has to look in all the #included headers to know how to compile the code in your .cpp file.
With large projects (or ones using libraries like MFC) these headers can get huge, and thus take a long time to compile.
Because most of these headers don't change that often (if ever), you can get the compiler to "precompile" them - it processes them and saves its state into a precompiled header. THe next time it compiles, it doesn't need to read and compile all those headers again, so it is much faster.
One requirement in Visual Studio is that if you use a precompiled header, it must be included in every file in the project.
If the project is small, or you don't build it often, then you can just disable the "precompiled header" option (in the project settings. This applies to the whole project). The only effect you'll get is that it may compile more slowly. Or leave the option enabled and just add #include "stdafx.h" as the first include in every file.