I recently installed xcode command line tools on my Mac. Its OS is version 10.9.5. To test out the g++ compiler I created a simple "hello world" c++ program, called it program.cpp and put it on my desktop:
#include <iostream>
using namespace std;
int main()
{
cout<<“Hello World”;
return 0;
}
Then I intended to create a compiled version of program.cpp, opened terminal, changed my directory to the desktop and typed the following command:
g++ -o program program.cpp
I received the following compilation errors:
program.cpp:7:11: error: non-ASCII characters are not allowed outside of
literals and identifiers
cout<<“Hello World”;
^
program.cpp:7:14: error: use of undeclared identifier 'Hello'
cout<<“Hello World”;
^
program.cpp:7:25: error: non-ASCII characters are not allowed outside of
literals and identifiers
cout<<“Hello World”;
^
3 errors generated.
Is this a problem with the command line tools or something else? Any help would be appreciated.