You should not use the C-headers (except for system-level
headers) from C++ programs. Instead, you should use a set of
headers that are named by prepending 'c' and, as usual,
omitting the extension (.h). For example, instead of using
<math.h>, you
should use <cmath>. In some cases this has
the advantage that the C++-header is more standardized than
the C-header (i.e. <ctime> (almost)
corresponds to either <time.h> or <sys/time.h>).
The standard specifies that if you include the C-style header
(<math.h> in
this case), the symbols will be available both in the global
namespace and in namespace std:: (but
libstdc++ does not yet have fully compliant headers) On the
other hand, if you include only the new header (i.e. <cmath>), the symbols
will only be defined in namespace std::
(and macros will be converted to inline-functions).
For more information on this, and for information on how the
GNU C++ implementation might reuse ("shadow") the C
library-functions, have a look at
www.cantrip.org.
