Pablo Suarez writes:
When I code
#include "myheader.h"
then this header file is searched in the current directory.
But where does the compiler search the header file when I write
#include <myheader.h>
instead?
Each compiler has its on preconfigured list of directories which it searches
for the header files. This is a compiler-specific setting. Check the
documentation for your compiler if you need to know what they are.
Most compilers recognize the -I option that adds a directory to the list of
directories it searches for header files. Incidentally, if the compiler does
not find "filename.h" in the current directory (actually, not the current
directory, but the directory where the source file, that referenced this
header file, is located), it continues to search for filename.h in the same
list of directories. The only actual difference between "filename.h" and
<filename.his that the former one is searched for in the source directory
first.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
iD8DBQBIL5AUx9p3GYHlUOIRAm8oAJ0R1AmBVivAlOTO1pHWIp 77jKgmIgCeO2H0
eugRkuTsFq3oKysXEgfosi4=
=gKNy
-----END PGP SIGNATURE-----