Each implementation that I know of, and, of course, MSVC 2005 and linux, allows you to specify the paths to directories in which to find header files. You should include D: \ temp \ temp_lib in the list of directory paths and then use
#include <temp.h>
For gcc, use the -I path. For MSVC see Where does Visual Studio look for C ++ header files?
The reason # 1 is not a syntax error is that although it looks like a string literal, it is not. Specification
#include "q-char-sequence"
Where q is char
any member of the original character set except a newline and "
In particular, \ does not really matter. The interpretation of the q-char sequence is determined by the implementation.
source share