On Wed, Aug 17, 2005 at 04:43:05PM +0300, Peter wrote:
> 
> My g++ compiler seems to be misconfigured. It is gcc/g++ 3.3.3 from 
> Debian and it cannot find simple things, like cout. Example:
> 
> /usr/include/c++/3.3/iostream contains:
> 
>       extern ostream cout;
> 
> My test program is:
> 
> #include <iostream>
> 
> int main( int argc, char *argv[] )
> {
>         cout << "Hello, World!\n";
>         exit(0);
> }
> 
> And compiling yields:
> 
> [EMAIL PROTECTED]:~/download/c++-check$ make 1
> g++     1.cpp   -o 1
> 1.cpp: In function `int main(int, char**)':
> 1.cpp:5: error: `cout' undeclared (first use this function)
> 1.cpp:5: error: (Each undeclared identifier is reported only once for 
> each
>    function it appears in.)
> make: *** [1] Error 1
> 
> HUH ?
> 
> Any input will be welcome, thanks,

Either add 'using namespace std' or #include the older iostream.h.
-- 
Didi


=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to