On Wed, 5 Mar 2003 07:33:19 -0500
Kevin Coyner <kevin@rustybear.com> wrote:
>
> I'm learning C++ and ran into a bit of difficulty with boolalpha.
>
> I guess I don't have all the right libraries loaded (although I
> would have thought this one was quite basic) because the following
> doesn't work:
>
> cout.setf(ios_base::boolalpha); // from textbook
>
> The err msg I get is:
>
> `ios_base' undeclared (first use this function)
>
> So o.k., I see that there's been no declaration. So I looked
> through my /usr/include and did some grepping for boolalpha, and
> nothing is returned. Which must mean I'm missing a header file.
> Could someone please give me a tip as to what header file I might be
> missing, and even better, what package it might be in?
AFAIK GCC 2.95 doesn't have the ios_base namespace , you'll have to
use ios instead.
however boolalpha is not implemented in 2.95, so you'll have install
g++-3.2 (only in testing I believe).
if you plan on learning C++ I recommend you use 3.2, it is more
standard compliant and will give you more verbose warnings and errors.
but please note that there is not binary compatibility between
C++ code compiled using different versions of GCC so if you use GCC
3.2 you won't be able to link against C++ libraries provided by debian
(like QT for instance).
what I do is have the two versions installed, I use 2.95 for compiling
any software I download and 3.2 for my own code.
cheers,
Alaa
--
get my PGP/GPG signature at
http://www.geocities.com/alaaov/pub_key.txt
Perilous to all of us are the devices of an art deeper than we
ourselves possess.
-- Gandalf the Grey [J.R.R. Tolkien, "Lord of the Rings"]
Attachment:
pgp9WP8h6NmG_.pgp
Description: PGP signature