string class header not found

Mike Reedy mike_reedy@yahoo.com
Tue Dec 17 22:53:00 GMT 2002


With new install RedHat 8.0, gcc3.2, the following
fails to compile:
----------
#include <iostream.h>
#include <string>

main()
{
        string mys = "This is a test";

        cout<<mys<<endl;
        cout<<"done"<<endl;
} 
----------
Msg: `string' undeclared (first use this function)
----------
Obviously the "string" header file is not found
although it exists at same location as in RedHat 7.x,
at /usr/include/g++-3/string.

Attempted to work around using "-I" directive but that
caused more havoc.

How can I correct this behavior?
Regards,
mike_reedy@yahoo.com

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com



More information about the Gcc-help mailing list