TerraPhase TerraPhase - 1 year ago 47
C++ Question

Error C1083: Cannot open include file: 'stdafx.h', but it should?

#include <stdafx.h>

i checked error C1083: Cannot open include file: 'stdafx.h': No such file or directory in VS 2005
but it still didn't help. im using precompiled headers. Usually i start out with a template ive saved for myself. that has all the headers i like, and in the past the include has worked. Also i would attach code, but its not allowing me to access it on any proj at all. even a simple hello world.

Answer Source

Try #include "stdafx.h".

This will change the way the compiler looks for the header - namely, it will check the local directory.

Here is the SO question for further reference.