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 helloworld.cc
#include
using namespace std;
int main()
{
cout << "Hello World !"; cout << "\n"; return 0; } 2. Goto the file location using cd command.eg. cd /home/linux 3. Type the following commands and press enter. linux@linux:~>g++ hello.cc -o hello
linux@linux:~>./hello
If you have done it correctly you would see the following lines on your shell.
Hello World !
Have fun!
Waruna
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home