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

Re: [rhn-users] g++ error

On 17 May 2003, Rajko Albrecht wrote:

> Am Fre, 2003-05-16 um 04.56 schrieb Reaz:
> > Hear is a small program which give the following error when compiling
> > under
> > redhat 9.0 but with redhat 7.0 it work fine when  using g++ or gcc
> put a 
> using namespace std;
> after the include files.
> this is the right syntax, elderly compiler didn't respect the g++
> standard at this point so them would compile this (wrong) code.
> R.

Or stick a std:: in front of all the cout's and endl's.
I.e. std::cout << "BLAH" << std::endl;

using namespace std; 
is a bit easier though.

Like Rajko said, the gcc (g++) in RHL 9 is a *much* more ANSI
standard C++ compiler. This namespace stuff was one of the many
way overdue improvements. Many of shed tears of joy. :)

...OK... let's get back on topic! Red Hat Network is cool!

 /odd Warner                                    <taw {redhat,pobox}.com>
          Bit Twiddler - Operation Cheetah Flip - Red Hat Inc.
---------------------gpg info in the message headers--------------------
Be kind on Usenet, some posters are only eleven years old.
-- Guido van Rossum

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