Hello!
Today, I've just installed Ubuntu last night and now I'm trying to follow some C++ tutorials, but in order to do that I need a working compiler...
I've done all the commands needed to get g++ working in terminal :
sudo apt-get install build essentials
sudo apt-get install g++
And both worked flawlessly, IMO.
Now I made a .cpp document, and dropped it on my desktop. I go back into terminal and type the following : g++ Desktop/HelloWorld.cpp -o HelloWorld.o and I hit enter. All this does it send me on to the next line.
Example :
****@ubuntu:~$ g++ Desktop/HelloWorld.cpp -o HelloWorld.o
***@ubuntu:~$ []
meaning it doesnt show me that I've done anything..
I then try : g++ HelloWorld.cpp and all I get are a ton of errors. Any help would be appreciated. I posted this in the Linux section but apparently not as many people browsing that, as there is this one.
Oops forgot my code I'm using, sorry.
1 2 3 4 5 6 7 8 9
|
#include <iostream>
using namespace std;
int main()
{
cout << "Hello World\n";
cin.get();
}
|