Re: Error on overloading IOStream operators in C++
Re: Error on overloading IOStream operators in C++
- Subject: Re: Error on overloading IOStream operators in C++
- From: John Daniel <email@hidden>
- Date: Fri, 9 Feb 2007 09:01:07 -0600
I wouldn't either. Personally, I always use "std::" on all my
standard objects. But I've never heard of anyone else who does that.
They all just do a "using namespace std;" and I don't try to fight
them. People very rarely use enough of the standard library to cause
any problems by issuing a "using namespace std;".
However, if you are just defining function declarations using
iostream types, you can sometimes get away with:
#include <iosfwd>
But once you start using them, you will almost always need the full
#include <iostream>
John
On Feb 9, 2007, at 8:13 AM, Thomas Engelmeier wrote:
I wouldn't recommend that.
Additional iostream operators are potentially declared in an header
file, and this will "poison" all files #including the header. If
one really feels the urgent need to use a using directive,
using std::istream;
using std::ostream;
using std::iostream;
using std::endl;
is at least partially cleaner.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40etresoft.com
This email sent to email@hidden
_______________________________________________
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