Clarification on #include <ostream>

Discussion in 'C++' started by Stefan Ram, Jun 14, 2011.

  1. Stefan Ram

    Stefan Ram Guest

    The C++ standard from the 90s said that »#include <ostream>«
    was required to use »<<« as in »::std::cout << 0«.

    But since no implementation required this, it was often said
    to be a defect in the standard.

    Has this requirement been removed from the standard in the
    meantime?
     
    Stefan Ram, Jun 14, 2011
    #1
    1. Advertising

  2. Stefan Ram

    Bo Persson Guest

    Stefan Ram wrote:
    > The C++ standard from the 90s said that »#include <ostream>«
    > was required to use »<<« as in »::std::cout << 0«.
    >
    > But since no implementation required this, it was often said
    > to be a defect in the standard.
    >
    > Has this requirement been removed from the standard in the
    > meantime?


    Yes, the new standard (C++11) requires <iostream> to include <istream>
    and <ostream>.



    Bo Persson
     
    Bo Persson, Jun 14, 2011
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Rakesh
    Replies:
    2
    Views:
    357
    Kevin Goodsell
    Apr 18, 2004
  2. Rakesh
    Replies:
    7
    Views:
    307
    Kevin Goodsell
    Apr 19, 2004
  3. Andreas Bogenberger
    Replies:
    3
    Views:
    923
    Andreas Bogenberger
    Feb 22, 2008
  4. Replies:
    2
    Views:
    1,908
  5. , India
    Replies:
    3
    Views:
    2,861
    James Kanze
    Nov 13, 2010
Loading...

Share This Page