Boost logo

Boost :

From: Neil (neil_at_[hidden])
Date: 2001-07-13 20:19:51


Hmmm. Seems to be a problem with "" vs <> with include statements.

As an "old-time" C programmer, the difference is as follows:
#include <abcd.h> (compiler looks for abcd.h in the INCLUDE path)
#include "abcd.h" (compiler looks in the current directory first, then in
the INCLUDE path).

Why have a distinction?
The C language is (was?) remarkably free of constraints, and so the
programmer was able to redefine
the declarations in the include files. This usually produced chaos later on
during the support phase of a
project, but nevertheless the programmer was free to do it. All one ahd to
do was copy the include file
to the current directory, change the declarations desired, and link with the
appropriate library containing
the redefined binary.

Is there a semi-valid use for such a concept?
Yes.
I used it for debugging purposes, say keeping stats on a subroutine that
stores data to a file.
Just redefine the fprintf function to monitor itself and display usage to a
systems console.
It was an easy way to monitor things --- all without the use of a debugger,
which slowed things down.
When the debugging was over, just change the "" to <> and relink with the
regular libary.

Hope this helps SOMEONE ...
Neil


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