Boost logo

Boost :

From: Pete Becker (petebecker_at_[hidden])
Date: 2002-07-20 14:34:25


At 12:19 PM 7/20/2002 -0700, Noel Yap wrote:
>IIRC, the difference between #include <> and #include
>"" is that the latter will check the directory of the
>includer for the included file before checking the
>include path.

That's what many implemenations do, although the language definition
doesn't require it. But note that there are two variations that are both
described that way. In the first, the 'includer' is the source file being
compiled. In the second, the 'includer' is the file that contained the
#include directive, which could be an include file located in a different
directory from the source file being compiled.

src\test.cpp:
     #include "sample.h"

src\header.h:
     // ...

include\sample.h:
    #include "header.h"

include\header.h:
     // ...

Under the first model, test.cpp will get the contents of src\header.h.
Under the second it will get the contents of include\header.h.

        -- Pete

Dinkumware, Ltd.
"Genuine Software"


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk