Re: include header
On Mar 20, 3:07 am, Kai-Uwe Bux <jkherci...@gmx.net> wrote:
June Lee wrote:
when include headers in C++ what's different when using
< > or " " like the following?
#include "ne_session.h"
#include <ne_uri.h>
What these do is mostly up to the implementation. You have to
check the documentation of your compiler. Pay particular
attention to settings and switches.
In practice, however, the first will first look in the directory
where the including file is located, then behave more or less
like the second. There may be options to override this, but if
you specify include directories using the more or less standard
-I option (or /I under Windows), then the first looks first in
the directory where the including file is located, then in the
directories specified by the -I options (in the order they were
given), then in the "standard" locatsions; the second just skips
the lookup in the directory where the including file is located.
Of course, there's no guarantee about this from the standard,
but the above does hold for pretty much all compilers on the
usual platforms (Windows and mainstream Unix). I think some of
the compilers have additional options, which can be used to
change it, however.
In good coding practice, of course, the first is used for your
headers, the second for system headers (with a more or less
application dependent notion of what is "system"---I would
generally consider things like the data base, or Boost, part of
the "system").
--
James Kanze (GABI Software) email:james.kanze@gmail.com
Conseils en informatique orient=EF=BF=BDe objet/
Beratung in objektorientierter Datenverarbeitung
9 place S=EF=BF=BDmard, 78210 St.-Cyr-l'=EF=BF=BDcole, France, +33 (0)1 30 2=
3 00 34