Why do I need to include the precompiled header in all the files in C++?
If I don't include the stdafx even in an empty .cpp, I get this error fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "StdAfx.h"' to your source? Why do I need to include it even in dummy files? If you use them, then you must include them. But you can turn them off in the project properties. However, the recommended way to use them is to "Force Include" the PCH from the command line , so that the file itself doesn't contain the PCH. That way the source file can be compatible with other systems. You can disable precompiled headers