Xcode using namespace std

Helping a friend with his C++ class and I'm a little rusty...not a programmer but I did really enjoy the class. We noticed that we are having a problem with the initial heading working correctly in Xcode:


#include <iostream>

using namespace std;



std on my programs from last year is highlighted in purple and through out the program all my cout & cin code is as well. If I remember correctly std is found in the iostream library that I have called to be included in the program. We do that because if not I would be typing std::cout, std::cin, etc over and over again in a program, right?


For some reason std is not highlighting purple...it just stays black as does the associated commands (cout, cin). The program will not run at all. I just tried to do a simple print text to the screen but nothing and that is when I noticed the std problem.


Any fixes? Anyone know why this problem is happening? Now I'm curious and a little ****** off I can't get it to work...but I need to be working on Calc 2 not this!


Thanks guys and gals!

Mac mini (Late 2012), OS X Yosemite (10.10.1)

Posted on Jan 28, 2016 7:43 PM

2 replies

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Xcode using namespace std

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.