Hi guys!
I've been trying to teach myself C++ from a book that is written for PC users (most are). I simply skipped the steps it says about installing the compiler that comes with the book, and figured i'd use XCode. After all, C++ is the same, no matter the platform. However, i'm having a bit of difficulty. When I try to type in the code examples they give, and then compile and run them, all the "build" and "run" commands are greyed out in the pulldown menus. All i have is a simple C++ file (.cpp). No headers, no make files, nothing. Just that little bit of code. What am I doing wrong?
here's the code:
#include <iostream>
using namespace std;
int main() {
cout << "Never fear, C++ is here!";
return 0;
}
I've been trying to teach myself C++ from a book that is written for PC users (most are). I simply skipped the steps it says about installing the compiler that comes with the book, and figured i'd use XCode. After all, C++ is the same, no matter the platform. However, i'm having a bit of difficulty. When I try to type in the code examples they give, and then compile and run them, all the "build" and "run" commands are greyed out in the pulldown menus. All i have is a simple C++ file (.cpp). No headers, no make files, nothing. Just that little bit of code. What am I doing wrong?
here's the code:
#include <iostream>
using namespace std;
int main() {
cout << "Never fear, C++ is here!";
return 0;
}