I've tried running a simple Hello World Program on my new mac in both xcode and using text edit and g++. It says it executes successfully but there is no out put, it just runs then returns. Here is the code and response from the terminal.
#include <iostream>
using namespace std;
int main ()
{
cout << "Hello World!";
return 0;
}
179-100:~/C++ Projects mlagrone$ g++ -g -O -c main.cpp
179-100:~/C++ Projects mlagrone$ g++ -g -O -c main.cpp
179-100:~/C++ Projects mlagrone$ g++ -g -O -c main.cpp
179-100:~/C++ Projects mlagrone$ g++ -g main.cpp
179-100:~/C++ Projects mlagrone$ g++ main.cpp
179-100:~/C++ Projects mlagrone$ g++ -c main.cpp
179-100:~/C++ Projects mlagrone$ g++ -g -frepo -O -c main.cpp
179-100:~/C++ Projects mlagrone$ g++ main.cpp
179-100:~/C++ Projects mlagrone$ g++ main.cpp
As you can see, no output, just back to command line. Can anyone help me?
Thx
#include <iostream>
using namespace std;
int main ()
{
cout << "Hello World!";
return 0;
}
179-100:~/C++ Projects mlagrone$ g++ -g -O -c main.cpp
179-100:~/C++ Projects mlagrone$ g++ -g -O -c main.cpp
179-100:~/C++ Projects mlagrone$ g++ -g -O -c main.cpp
179-100:~/C++ Projects mlagrone$ g++ -g main.cpp
179-100:~/C++ Projects mlagrone$ g++ main.cpp
179-100:~/C++ Projects mlagrone$ g++ -c main.cpp
179-100:~/C++ Projects mlagrone$ g++ -g -frepo -O -c main.cpp
179-100:~/C++ Projects mlagrone$ g++ main.cpp
179-100:~/C++ Projects mlagrone$ g++ main.cpp
As you can see, no output, just back to command line. Can anyone help me?
Thx