Re: Is Xcode C++ non-standard?
Re: Is Xcode C++ non-standard?
- Subject: Re: Is Xcode C++ non-standard?
- From: Marshall Clow <email@hidden>
- Date: Tue, 28 Sep 2004 17:01:26 -0700
At 6:50 PM -0500 9/28/04, 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++?
That's because C++ has changed since you took that C++ class (back in
the last millenium).
Short, quick answer - put
using namespace std;
at the top of your source files (after all the include files).
Longer, better answer
Learn about C++ namespaces.
Here's a place to start <http://www.cplusplus.com/doc/tutorial/tut5-2.html>
--
-- Marshall
Marshall Clow Idio Software <mailto:email@hidden>
It is by caffeine alone I set my mind in motion.
It is by the beans of Java that thoughts acquire speed,
the hands acquire shaking, the shaking becomes a warning.
It is by caffeine alone I set my mind in motion.
_______________________________________________
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