[5627] in testers
Re: g++ and cout
daemon@ATHENA.MIT.EDU (Aaron M. Ucko)
Tue Jul 8 10:32:07 2003
To: Kevin Chen <kchen@MIT.EDU>
Cc: testers@MIT.EDU
From: amu@alum.mit.edu (Aaron M. Ucko)
Date: Tue, 08 Jul 2003 10:32:05 -0400
In-Reply-To: <testers:5626@unknown-discuss-server> (Kevin Chen's message of
"Tue, 8 Jul 2003 09:43:50 -0400 (EDT)")
Message-ID: <udlhe5xw0m2.fsf@multics.mit.edu>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Kevin Chen <kchen@MIT.EDU> writes:
> test.cpp: In function `int main()':
> test.cpp:4: `cout' undeclared (first use this function)
> test.cpp:4: (Each undeclared identifier is reported only once for each
> function
> it appears in.)
This is a feature (improved standard compliance). You need to either
qualify cout with std:: or precede its use with one of the declarations
using std::cout;
using namespace std;
--
Aaron M. Ucko, KB1CJC (amu at alum.mit.edu, ucko at debian.org)
Finger amu@monk.mit.edu (NOT a valid e-mail address) for more info.