Thread: Next C standard

  1. #16
    and the hat of sweating
    Join Date
    Aug 2007
    Location
    Toronto, ON
    Posts
    3,545
    Quote Originally Posted by Thantos View Post
    http://www.cplusplus.com/reference/iostream/fstream/

    They show fstream inheriting from iostream which in turn inherits from istream and ostream.
    ifstream and ofstream inherit from istream and ostream individually.
    Yes, that's also the way it's shown in Bjarne Stroustrup's book.
    But when I look at the header files in VC++ 2008 they do this:

    <ostream> includes <ios>
    <istream> includes <ostream>
    <fstream> includes <istream>
    <iostream> includes <istream>

    I wonder why they do it that way?

  2. #17
    & the hat of GPL slaying Thantos's Avatar
    Join Date
    Sep 2001
    Posts
    5,681
    Because it is microsoft?

    I should note that what I mentioned before is about the class and not the headers. What headers are included doesn't always indicated what the inheritance of the classes is.

  3. #18
    and the hat of sweating
    Join Date
    Aug 2007
    Location
    Toronto, ON
    Posts
    3,545
    Quote Originally Posted by Thantos View Post
    Because it is microsoft?

    I should note that what I mentioned before is about the class and not the headers. What headers are included doesn't always indicated what the inheritance of the classes is.
    True, but since VC++'s <fstream> doesn't include <iostream> it definitely can't derive from std::basic_iostream

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Bug in iterator comparison in C++ standard?
    By steev in forum C++ Programming
    Replies: 14
    Last Post: 07-12-2008, 12:02 AM
  2. Abstract Base Class and References
    By Thantos in forum C++ Programming
    Replies: 9
    Last Post: 10-13-2004, 01:35 PM
  3. im extreamly new help
    By rigo305 in forum C++ Programming
    Replies: 27
    Last Post: 04-23-2004, 11:22 PM
  4. include question
    By Wanted420 in forum C++ Programming
    Replies: 8
    Last Post: 10-17-2003, 03:49 AM
  5. Using c++ standards
    By subdene in forum C++ Programming
    Replies: 4
    Last Post: 06-06-2002, 09:15 AM