• 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: GCC 4 and iostream.h
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GCC 4 and iostream.h


  • Subject: Re: GCC 4 and iostream.h
  • From: "James Larcombe" <email@hidden>
  • Date: Wed, 14 Dec 2005 14:02:38 -0000

Stephane Sudre wrote:

#include <iostream>

...

cout << "<(" << stringFromClass() << " *) "<< this << " [" << retainCount_ << "]>\n";

=>

error: `cout' undeclared (first use this function)

Works fine with "iostream.h".

I think that's because <iostream> puts everything inside namespace 'std', whereas the old headers such as "iostream.h" use the global namespace.

Try std::cout instead - that should work. Alternatively, you could
use a 'using' directive.

James
_______________________________________________
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: 
 >GCC 4 and iostream.h (From: Stephane Sudre <email@hidden>)
 >Re: GCC 4 and iostream.h (From: Paul Walmsley <email@hidden>)
 >Re: GCC 4 and iostream.h (From: Stephane Sudre <email@hidden>)

  • Prev by Date: Re: GCC 4 and iostream.h
  • Next by Date: Re: GCC 4 and iostream.h
  • Previous by thread: Re: GCC 4 and iostream.h
  • Next by thread: Re: GCC 4 and iostream.h
  • Index(es):
    • Date
    • Thread