• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Error on overloading IOStream operators in C++
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Error on overloading IOStream operators in C++


  • Subject: Re: Error on overloading IOStream operators in C++
  • From: Howard Hinnant <email@hidden>
  • Date: Fri, 9 Feb 2007 13:17:50 -0500

On Feb 9, 2007, at 10:01 AM, John Daniel wrote:

But once you start using them, you will almost always need the full #include <iostream>

Actually you don't want to *ever* #include <iostream> unless you want to refer directly to one or more of:


cout
cin
clog
cerr
wcout
wcin
wclog
wcerr

(i.e. the terminal streams).

If you are just writing your inserter (operator<<) or extractor (operator>>) you are much better off to include <ostream> and/or <istream>.

<iostream> is the one and only C++ header which extracts a size and runtime cost just for including it. Never include it unless you absolutely have to.

-Howard

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Error on overloading IOStream operators in C++ (From: Adam Spooner <email@hidden>)
 >Re: Error on overloading IOStream operators in C++ (From: John Daniel <email@hidden>)
 >Re: Error on overloading IOStream operators in C++ (From: Thomas Engelmeier <email@hidden>)
 >Re: Error on overloading IOStream operators in C++ (From: John Daniel <email@hidden>)

  • Prev by Date: Re: Compile acts differently when run from terminal and in debugger???
  • Next by Date: Re: Strange behavior in XCode, not exhibited in Dev-C++
  • Previous by thread: Re: Error on overloading IOStream operators in C++
  • Next by thread: multiple definitions of symbol _xxxx
  • Index(es):
    • Date
    • Thread