Friday, December 10, 2004

Run a simple c++ program in suse 9.1

First you should install gcc-c++ compiler which is available in suse instalation cds.

1. Type the following lines on your favourite editer and save it as

using namespace std;
int main()
cout << "Hello World !"; cout << "\n"; return 0; } 2. Goto the file location using cd cd /home/linux 3. Type the following commands and press enter. linux@linux:~>g++ -o hello


If you have done it correctly you would see the following lines on your shell.
Hello World !

Have fun!


Post a Comment

Subscribe to Post Comments [Atom]

<< Home