This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

difference between and " " for # include

What is the difference between these two sentence:( <> and " ")?

#include <rtl.h>

#include "rtl.h"

Parents
  • Yes. #include "xxx" is defined by the standard to first do one implementation-defined search, and if that fails a new attempt is made - this time using the rules for #include <xxx>.

    No, they are both implementation defined.

    But the important thing is that no modern compiler will not perform an initial search in the current directory when seeing #include "xxx".

    I have no evidence to the contrary but still think that statement is assuming an awful lot.

Reply
  • Yes. #include "xxx" is defined by the standard to first do one implementation-defined search, and if that fails a new attempt is made - this time using the rules for #include <xxx>.

    No, they are both implementation defined.

    But the important thing is that no modern compiler will not perform an initial search in the current directory when seeing #include "xxx".

    I have no evidence to the contrary but still think that statement is assuming an awful lot.

Children