.

Started by
2 comments, last by me22 18 years, 5 months ago
[Edited by - alex_and_his_towel on December 1, 2005 6:17:35 PM]
Advertisement
These files are probably already included in iostream (or somehow the compiler already included these files in Options or something), it has nothing to do with namespaces.
Edit: These header files can also be included in a precompiled header file, if your project use it (a header file that is compiled first, correct me if im wrong).
pex.
iostream makes use of quite a lot of other parts of the Standard C++ Library, so naturally they'll reuse the code and include the appropriate headers with iostream. However, I'd assume that how the internal dependencies between the standard headers is structured is implementation defined, and as such I'd recommend you still include the headers that the definations are supposed to be in. For all you know other compilers or even other versions of your compiler won't include the same headers internally, thus breaking your code if you really on it.
"Voilà! In view, a humble vaudevillian veteran, cast vicariously as both victim and villain by the vicissitudes of Fate. This visage, no mere veneer of vanity, is a vestige of the vox populi, now vacant, vanished. However, this valorous visitation of a bygone vexation stands vivified, and has vowed to vanquish these venal and virulent vermin vanguarding vice and vouchsafing the violently vicious and voracious violation of volition. The only verdict is vengeance; a vendetta held as a votive, not in vain, for the value and veracity of such shall one day vindicate the vigilant and the virtuous. Verily, this vichyssoise of verbiage veers most verbose, so let me simply add that it's my very good honor to meet you and you may call me V.".....V
The C++ standard does not allow you to assume that any headers include any others. If you use something from a certain header, you are required to include that header to be strictly valid C++.

That being said, it's fair to assume that <iostream> will bring in <istream> and <ostream>, for example. But on the other hand, if you use something from <algorithm> or <iterator>, don't count on a container or *stream pulling in those.

This topic is closed to new replies.

Advertisement