[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: g++-3.2 problem



Hi,

* W. Paul Mills <Paul-NOT@Mills-USA.com> [030523 12:16]:
> The following program compiles with g++-2.95, but not with g++-3.2. Any 
> idea why? 

You need to specify the std namespace.

Use old style "#include <iostream.h>" and it works in 3.2.
> 
> Paul
> 
> 
> // hello.C
> 
> #include <iostream>
> 
> 
> int main(void)
> {
>   cout << "Hello World!\n";

Should be "std::cout"... also you should use std::endl rather than \n.

>   return 0;
> }

Nick.


-- 
Debian testing/unstable
Linux twofish 2.4.20-looxt93c8 #1 Thu May 22 10:43:41 JST 2003



Reply to: