Re: Is Xcode C++ non-standard?
Re: Is Xcode C++ non-standard?
- Subject: Re: Is Xcode C++ non-standard?
- From: Jim Ingham <email@hidden>
- Date: Tue, 28 Sep 2004 17:03:51 -0700
The C++ standard actually requires that the standard iostream commands
(and everything else from the standard C++ library) NOT be in the
global namespace. If you want to refer to the stuff in std:: without
the prefix, you need to say "using std".
You can also do:
#include <iostream.h>
if you want to get the "old fashioned" behavior, where the standard C++
library functions are in the global namespace. That just #include's
iostream, then issues a whole bunch of "using" directives.
Jim
On Sep 28, 2004, at 4:50 PM, Bert Knabe wrote:
I took a class in C++ years ago, and since OS X has built in
programming tools and I have a couple of books on C++ I would like to
start learning again. But there is one small problem that I hope can
be easily fixed. In order to use what I thought were standard iostream
commands, for example cin and cout, I have to prepend them with
'std::' or I get an error. Is there something I need to add or include
besides iostream? Do I need to get libstdc++?
Thanks for any help,
Bert Knabe
Computer Technician
Lubbock Avalanche Journal
(806) 766-2158
_______________________________________________
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
_______________________________________________
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