2009-11-07 12:56:47 UTC
#include
using namespace std;
int main ()
{
cout << "Hello World!" << endl;
return 0;
}
it worked perfectly.
i switched from windows to linux recently (i never really liked windows lolz)
- i installed the needed compiler [with yahooanswers help :)]
(sudo apt-get install build-essential)
- i installed VIM
- i opened VIM and changed the filetype to C++
I typed the same code like above inside the VIM editor, all fine till now.
- i save the file (HelloWorld.cpp)
- i open the terminal and type
"g++ HelloWorld.cpp", nothing happens, then i try
"g++ HelloWorld.cpp -o HelloWorld", same, nothing happens.
Since I'm new to Linux & Programming, obviously I'll do something wrong.
Can anyone tell me what I did wrong, or if I forgot something?
<<< pls dont recommend me some IDEs, i find it more fun just having to use an editor to program, lol >>>
thanks to everyone.