James Kanze
10/23/2008 8:55:00 AM
On Oct 23, 2:46 am, Luna Moon <lunamoonm...@gmail.com> wrote:
> Here is a quote from the book: C++ Annotations,
I'm curious: which book? (I ask because while fully
understandable, the text you quote was obviously not written by
a native speaker. And any decent publishing house would have
gotten it cleaned up.)
> I don't understand these sentences, could anybody help me?
> As a side effect to this implementation it must be stressed
> that it is not anymore correct to declare iostream objects
> using standard forward declarations, like:
> class ostream; // now erroneous
> Instead, sources that must declare iostream classes must
> #include <iosfwd> // correct way to declare iostream classes
Well, it says what it says: traditionally, most header files
didn't include <iostream.h>; they just forwarded declared the
classes from it that they needed. Because in the standard,
istream and ostream are not classes, however, this technique is
no longer legal, and in modern C++, you have to include <iosfwd>
instead.
--
James Kanze (GABI Software) email:james.kanze@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34