You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Developer Forums relocated!

Need help with Apple Developer tools and technologies? Want to share information with other developers and Apple engineers? Visit Developer Forums at Apple.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

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

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.