Suppose your project current directory is 0. /home/myproj/ Let assume include foder are 1. /home/include1/ 2. /home/include2/ ==> # include "myhead.h" search for directory in order 0 , then 1 , then 2 AS IT SEARCH CURRENT DIR FIRST, USUALLY user defined headers used in this way. ==> # include search for directory in order 1 , then 2 , then 0 AS IT SEARCH INCLUDE DIR FIRST, standard headers used in this way. Header file extension: ================== In C : In early days it was .hxx, .hpp . Then it was .h #include myheader.hxx #include myheader.hp #include myheader.hpp In C++ : No extension. They are included in namespaces. #include using namespace std; // use original namespace you can also use it in code as std::stringfunction