What is the difference between these two sentence:( <> and " ")?
#include <rtl.h>
#include "rtl.h"
When you use <> the compiler looks in the compilers standard include directories.
When you do "" it first looks relative the current directory.
You should use "" for your include files and <> for header files supplied with the compiler.
By the way - this is documented in any book about C/C++ programming and also in the language standard. I recommend that you get a good book to read. When done, then get the official language and use as a reference.
It's actually implementation defined, not mandated by the standard. The OP should consult the Keil documentation.
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>.
The standard really has to be that vague since we once had MS-DOS 1.0 that didn't even had subdirectories. And an OS isn't even required to have a tree structure.
But the important thing is that no modern compiler will not perform an initial search in the current directory when seeing #include "xxx". The open issue then is if the current directory is the directory where the compiler was started, or the current directory where the source file was. Some compilers first tries the directory where the source file was, and then the directory where the compiler was started.
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.
Yes again. They are both implementation defined. But the "" version must, after doing the implementation defined thing and failing, then do the same thing as the <> version, as defined in 6.10.2 section 3.
Yes again.
Ah, I misunderstood what you said. Apologies.
No problem. Better with too much than too little clarifications.
View all questions in Keil forum