- Joined
- Jul 7, 2007
- Messages
- 137
- Reaction score
- 4
- Points
- 18
- Location
- Baltimore
- Your Mac's Specs
- iPod Video| 15" MacBook Pro | iPod Shuffle
I have a C++ file.
saved as main.cpp
I got to that directory in terminal and typed ' c++ main.cpp ', but I dont know if nothing happend or if it compiled. How can i tell? And how do I actually execute it?
Code:
#include <iostream>
using namespace std;
int main()
{
cout << "Hello World!" << endl;
return 0;
}
saved as main.cpp
I got to that directory in terminal and typed ' c++ main.cpp ', but I dont know if nothing happend or if it compiled. How can i tell? And how do I actually execute it?