#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2003
    Posts
    2
    Rep Power
    0

    cout.setf(ios_base::boolalpha); or Alternative


    My complier will not recognize:
    cout.setf(ios_base::boolalpha);
    is there some thing that will do the same thing I am new and trying to learn C++ and this showed up in the book and it will not work. I am using Dev C++ 4.9.6.0
  2. #2
  3. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2002
    Posts
    421
    Rep Power
    12
    that seems tough for a begginer to comprehend..Im just starting to get into OO in my book (around pg.300ish) and I wouldn't be able to tell you what that code does.
    hmmm...
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2003
    Posts
    2
    Rep Power
    0

    more info


    The program shows the value of expression the I insert the code
    cout.setf(ios_base::boolalpha);
    it is supposed to show the value in true or false.
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2003
    Location
    Right Coast
    Posts
    25
    Rep Power
    0
    this works in VC++ 6:

    #include <iostream>
    #include <iomanip>

    using namespace std;

    int main(){

    cout.setf(ios_base::boolalpha);

    bool wise = true;

    cout << wise;

    return 0;

    }

IMN logo majestic logo threadwatch logo seochat tools logo