[Nottingham] c++ header files

Robert Davies nottingham at mailman.lug.org.uk
Thu Aug 28 14:19:00 2003


On Thursday 28 Aug 2003 14:01, Johannes Kling wrote:

> > " This file contains one deprecated or antiquated header, Please
> > consider using one of the 32 headers found in Section 17.4.1.2 of
> > the c++ standard."
>
> IIRC, when C++ finally got standardised, all the header names they had
> decided upon had their .h stripped. Try changing the lines to:
>
> #include <iostream>
>
> and their equivalents and see if that fixes things.

That should be right, but he'll need to add :

#include <iostream>
using namespace std;

The .h got dropped, when namespaces were defined, so iostream.h could be 
implemented by the 2 lines above.  Otherwise you have to add scope resolution 
to all his STL  dependancies eg) 'std::cout << "Hello, World!";'.  I'm not 
sure if the C++ standard is available online, Posix is and it's a 
surprisingly good read and useful.  But anyway, Stroustroup 3rd edition 
Programming in C++ covers ISO C++, so it's probably the most accessible 
source, and includes much useful rationale, not just tutorials.

Rob