That is Borland C code (cout) .. I don't know if gcc supports Borland
code??????

Have you tried printf or cprintf ?? Should work, well at least printf as
cprintf is not part of the ANSI-C standard...

Thanks

George Vieira
Service Engineer
http://www.anabelle.com.au
mailto:[EMAIL PROTECTED]


        -----Original Message-----
        From:   Chris Cogdon [SMTP:[EMAIL PROTECTED]]
        Sent:   Thursday, April 16, 1998 1:26 PM
        To:     [EMAIL PROTECTED]
        Subject:        problems compiling simple c++ program

        Nasty problem with redhat-5.0 that someone (hopehope) can help
me with:

        I've got a redhat-5.0 installation with everything installed,
and all the
        updates applied. (The gimmegimme option ;)

        I write this simple C++ program:

        #include <iostream.h>

        void main () {

                cout << "Hello world\n";

        }

        And compile with:

        cc -o t1 -lg++ t1.cpp

        It compiles, but when I run, I get no output whatsoever. If I
add in the
        following line:

        cout.flush ();

        it segfaults.


        Now, this seems really bizzare, and is probably just a
installation
        error... but... what? Any pointers, anyone ?



           ("`-/")_.-'"``-._         Chris Cogdon
<[EMAIL PROTECTED]>
            . . `; -._    )-;-,_`)   
           (v_,)'  _  )`-.\  ``-'    OzEmail Interline
          _.- _..-_/ / ((.'          76-78 Jolimont St. Jolimont VIC
3002 Australia
        ((,.-'   ((,/       fL       Phone +61 3 9654 0799      Fax +61
3 9654 0788


-- 
  PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
http://www.redhat.com/RedHat-FAQ /RedHat-Errata /RedHat-Tips /mailing-lists
         To unsubscribe: mail [EMAIL PROTECTED] with 
                       "unsubscribe" as the Subject.

Reply via email to