Praise writes:
AFAIK, there is no difference at all between ".h" and "not.h", there is
merely convention.
Well, quoting Stroustrup: "For every header <cX> defining name in the
namespace, there is a header defining the same in the global
namespace." So the .h is the C-style header, the other is the C++ header for
the same stuff, with the only difference of namespace.
The <cX> headers mentioned by Stroustrup are the Standard C library
headers, not the standard C++ library headers. Thus the standard
guarantees the existence of <cstdio> and but NOT the
existence of .
Anyway, I'm not an expert in C++ so this is just my personal opinion
based on the content of the C++ standard which follows:
************************************************************************
17.4.1.2 Headers
...
The C++ Standard Library provides 32 C++ headers, as shown in Table
11:
Table 11 C++ Library Headers
<algorithm> <iomanip> <list> <ostream> <streambuf> <bitset> <ios>
<locale> <queue> <string> <complex> <iosfwd> <map> <set> <typeinfo>
<deque> <iostream> <memory> <sstream> <utility> <exception> <istream>
<new> <stack> <valarray> <fstream> <iterator> <numeric> <stdexcept>
<vector> <functional> <limits>
The facilities of the Standard C Library are provided in 18 additional
headers, as shown in Table 12:
Table 12 C++ Headers for C Library Facilities
<cassert> <ciso646> <csetjmp> <cstdio> <ctime> <cctype> <climits>
<csignal> <cstdlib> <cwchar> <cerrno> <clocale> <cstdarg> <cstring>
<cwctype> <cfloat> <cmath> <cstddef>
Except as noted in clauses 18 through 27, the contents of each header
cname shall be the same as that of the corresponding header name.h, as
specified in ISO/IEC 9899:1990 Programming Languages C (Clause 7), or
ISO/IEC:1990 Programming Languages C AMENDMENT 1: C Integrity, (Clause
7), as appropriate, as if by inclusion. In the C++ Standard Library,
however, the declarations and definitions (except for names which are
defined as macros in C) are within namespace scope (3.3.5) of the
namespace std.
************************************************************************
--
Alexandr.Malusek@imv.liu.se