C++ compiler in Linux
Posted: Thu Mar 13, 2003 7:51 am
Hi Guys,
Can anyone tell me how I compile a C++ program in linux.
I have tried:
g++ prgm.cpp -o -Wall prgm and
g++ prgm.cpp -o prgm
and it does not work properly..
After I compile it, I get prgm as an executable, but when I click it, it does nothing, only tells me that
¨bash: prgm: command not found¨
Oh! - and what about the program contents.. I have
#include <iostream>
int main ()
{
cout << ¨Hello world¨<<endl;
return 0;
}
Is there something wrong with this code?
What do I have to do for it work properly..

Can anyone tell me how I compile a C++ program in linux.
I have tried:
g++ prgm.cpp -o -Wall prgm and
g++ prgm.cpp -o prgm
and it does not work properly..
After I compile it, I get prgm as an executable, but when I click it, it does nothing, only tells me that
¨bash: prgm: command not found¨
Oh! - and what about the program contents.. I have
#include <iostream>
int main ()
{
cout << ¨Hello world¨<<endl;
return 0;
}
Is there something wrong with this code?
What do I have to do for it work properly..