C++/difference of <> and " "
Expert: vijayan - 8/31/2008
Questionsir,
when im includeing a header file for eg #include<stdio.h>
and also as #include"stdio.h" both are succesfully compiled. what is the diffence of <> and " " then?
please help
Answerfor a #include <header_name> new-line
searches a sequence of implementation-defined places for a header identified uniquely by 'header_name'. typically this looks in a set of directories where standard implementation supplied headers reside.
for a #include "header_name" new-line
typically searches the current directory for a header identified uniquely by 'header_name'. if this fails, it searches for this header as in the case using <>
#include <stdio.h> looks in the default include directories for your implementation for a header identified by 'stdio.h'
#include "stdio.h" looks in the current directory for a header identified by 'stdio.h'. if it does not find it (in your case it does not), it proceeds as if the directive was #include <stdio.h>