#include<iostream>using namespace std;
int main(){
cout<<"Hello world";
return 1;
}
To Compile type the following command
g++ sample.cpp -o sample
To run type the following command
./sample
If you don't have g++ compiler you will get err or as in screenshot.
then you may need to install g++ compiler.
For install become super user as in
then you may need to install g++ compiler.
For install become super user as in
http://mycomputercodes.blogspot.com/2010/07/root-user-account-in-ubuntu-linux.html
using "su" command
using "su" command
To install type following command in terminal:
apt-get install g++
It will automatically download and install from Intern et.
Otherwise we can download
Code::Block IDE for compiling and running c++ program.
for that type following command as in screen shot:
apt-get install codeblocks



