Mailinglist Archive: opensuse (4288 mails)

< Previous Next >
Re: re[4]: [SLE] Visual C++
  • From: Alexandr Malusek <Alexandr.Malusek@xxxxxxxxxx>
  • Date: 17 May 2002 00:51:38 +0200
  • Message-id: <86adqzoged.fsf@xxxxxxxxxxxxxxxxx>
Praise <praisetazio@xxxxxxxxxxxxx> 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 <X.h> 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 <stdio.h> but NOT the
existence of <vector.h>.

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:

************************************************************************ Headers


The C++ Standard Library provides 32 C++ headers, as shown in Table

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.


< Previous Next >