September 20th, 2003, 09:17 AM
Problem running c++ program on linux(cout and string)
I am unable to execute this simple c++ code.
When I compile and execute it does not display anything.
gcc version 3.2 20020903 (Red Hat Linux 8.0 3.2-7)
I use following command to compile
$ g++ -Wno-deprecated -o aj aj.cpp
It does not display anything.
In fact, I am facing similar problem of running larger programs that includes string manipulations.
September 20th, 2003, 09:29 AM
Try to redirect the output to a file and see its contents or try
September 20th, 2003, 09:46 AM
Cout worked out. ("\n") was required.
September 20th, 2003, 01:05 PM
try instead of \n to use << endl
it's a little more portable. This comes up for me because I port between windows and UNIX a lot.