* string class header not found
@ 2002-12-17 22:53 Mike Reedy
2002-12-18 0:15 ` bjorn rohde jensen
0 siblings, 1 reply; 2+ messages in thread
From: Mike Reedy @ 2002-12-17 22:53 UTC (permalink / raw)
To: gcc-help
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: string class header not found
2002-12-17 22:53 string class header not found Mike Reedy
@ 2002-12-18 0:15 ` bjorn rohde jensen
0 siblings, 0 replies; 2+ messages in thread
From: bjorn rohde jensen @ 2002-12-18 0:15 UTC (permalink / raw)
To: Mike Reedy; +Cc: gcc-help
Hi Mike,
String resides in the std namespace like most
of the other C++ libraries. gcc/g++3 is much more
strict/compliant with this sort of thing. I also
think, it is not a good idea to mix old and new
style C++ headers. Something about subtle
incompatibilities dont recall where i heard it,
possibly this list there are clever people on it:)
Yours sincerely,
Bjorn
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-12-17 23:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-17 22:53 string class header not found Mike Reedy
2002-12-18 0:15 ` bjorn rohde jensen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).