I'm trying to use Mac OS X to write simple C++ programs, but I can't seem to get the compiler to work. At school, I use a Sun UNIX terminal and compile my programs though the shell using the "g++" command, but it doesn't seem to work properly on my Mac, even though I have installed BSD and the Developer Tools. Here is the simple code I tried to compile:
#include <iostream>
int main() {
std::cout << "hello";
}
Then, in the terminal I entered:
g++ test.cpp -o test
It generated a file "test", but it does nothing.
#include <iostream>
int main() {
std::cout << "hello";
}
Then, in the terminal I entered:
g++ test.cpp -o test
It generated a file "test", but it does nothing.