From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26452 invoked by alias); 17 Jul 2002 18:35:35 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 26439 invoked from network); 17 Jul 2002 18:35:33 -0000 Received: from unknown (HELO mailer.jlab.org) (129.57.35.124) by sources.redhat.com with SMTP; 17 Jul 2002 18:35:33 -0000 Received: from jlabs1.jlab.org (localhost [127.0.0.1]) by mailer.jlab.org (8.11.6/8.11.6) with ESMTP id g6HIZVY16655; Wed, 17 Jul 2002 14:35:31 -0400 (EDT) Received: from localhost (liji@localhost) by jlabs1.jlab.org (8.11.6/8.11.6) with ESMTP id g6HIZVw09830; Wed, 17 Jul 2002 14:35:31 -0400 (EDT) Date: Wed, 17 Jul 2002 11:35:00 -0000 From: Ji Li To: gcc-help@gcc.gnu.org cc: gcc@gcc.gnu.org Subject: STL with gcc3 Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2002-07/txt/msg00166.txt.bz2 Hello, I am experiencing some problem with STL when compile with gcc3. I have a little piece of c++ code like this: #include #include 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) _/_/_/ _/_/_/_/_/