scope of include directive

The template for C++ console applications start out with
#include stdafx.h
at the top.
The stdafx.h file is located in the same file (or in an extremely close file) as the source code for the new console application, which makes sense.
However, when I took a look at where the files that are #include'd in the stdafx.h file, I noticed that these documents were not anywhere near the project file that my source code was in. The project folder (the folder containing the source code and the stdafx.h document) is deep within 'My Documents', in the visual studio 2012 folder, however the documents included in stdafx.h (stdio.h, tchar.h) are off under Program Files in the Microsoft Visual Studio 11.0 folder.
How does "it" know, when asked to include stdio.h and tchar.h, where to find these documents?
With VS2010, there is a property page that determines where the compiler looks for various files. You can find this by right clicking on your project, selecting properties. Under configuration properties, you'll see VC++ directories. select that and you'll see the places that VC++ looks for exexcutables, include files, libraries, etc. In older versions of VS, this was under Tools; Options; VC++ Directories.

#include <file> will look in the directories specified in the VC++ include directory specification. #include "file" will look in the directories associated with your project (VC++/General/Include Directories).

Thank you! It is very much appreciated.
Topic archived. No new replies allowed.