
STL header files vs non-STL header files
1. I suppose you mean <cmath>, not <math>.
2. It is recommended (in theory) to include <csomething> headers instead of
<something.h> because <csomething> headers are supposed to use namespace
std, so one can use std::sqrt() instead of sqrt().
3. In practice, assuming you're using the VC implementation of the Standard
C++ library, I wouldn't recommend you using <csomething> headers because
currently they don't enclose anything into namespace std. So it's better to
stick with <math.h> etc for a while.
BTW, <cmath> is not a part of STL, it's a part of Standard C++ library (I
recall many flames in comp.std.c++).
Quote:
> hi,
> what is the difference between STL header files like <math> and non-STL
> header files like <math.h> ?
> I read somewhere that STL header files MUST be included rather than
non-STL
> header files.
> thanks