public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* STL with gcc3
@ 2002-07-17 11:35 Ji Li
  2002-07-17 11:40 ` Matt Austern
  2002-07-17 14:31 ` Joe Buck
  0 siblings, 2 replies; 6+ messages in thread
From: Ji Li @ 2002-07-17 11:35 UTC (permalink / raw)
  To: gcc-help; +Cc: gcc


Hello,

	I am experiencing some problem with STL when compile with gcc3. I
have a little piece of c++ code like this:

	#include <iostream>
	#include <string>

	int main(){
	string aa = "Hello World !";

	cerr << aa << endl;
	}

	If I compile it with gcc-2.96, there is no problem. However, when
I compile it with gcc-3.0.4, the compiler does not recognize neither
'string' nor 'cerr'. But if I add 'using namespace std;', gcc-3.0.4 works
fine with it.

	I believe there must be a way to make gcc-3.0.4 backward
compatable but just could find it. Would you please point the way for me?
Thanks a lot.

Regards.

Ji Li                              _/_/_/_/_/     _/
Physics Department                        _/     _/ 
Rensselaer Polytechnic Institute         _/     _/ 
Tel:(757)269-5328(JLab Office)      _/_/_/     _/_/_/_/_/

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2002-07-17 22:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-17 11:35 STL with gcc3 Ji Li
2002-07-17 11:40 ` Matt Austern
2002-07-17 14:15   ` Phil Edwards
2002-07-17 14:56     ` Ji Li
2002-07-17 15:01       ` Gabriel Dos Reis
2002-07-17 14:31 ` Joe Buck

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).