Thread: what does this mean

  1. #1
    Registered User whistlenm1's Avatar
    Join Date
    Jan 2002

    what does this mean

    I understand the typedef statement, I understand the enumeration declaration. How do fmtflags and fmt_flags interact with one another!

    typedef int      fmtflags;
        enum fmt_flags {
                         boolalpha     = 0x0001,
                         dec               = 0x0002,
                         fixed             = 0x0004,
                         hex               = 0x0008,
                         internal         = 0x0010,
                         left                = 0x0020,
                         oct                = 0x0040,
                         right             = 0x0080,
                         scientific       = 0x0100,
                         showbase    = 0x0200,
                         showpoint    = 0x0400,
                         showpos      = 0x0800,
                         skipws         = 0x1000,
                         unitbuf         = 0x2000,
                         uppercase    = 0x4000,
                         adjustfield    = left | right | internal,
                         basefield      = dec | oct | hex,
                         floatfield       = scientific | fixed
    Last edited by whistlenm1; 09-11-2003 at 10:03 AM.
    Man's mind once streched by a new idea, never regains its original dimensions
    - Oliver Wendell Holmes

    In other words, if you teach your cat to bark (output) and eat dog food (input) that doesn't make him a dog. It would have to chase cars, chew bones, and have puppies before I'd call it Rover ;-)
    - WaltP

  2. #2
    Hardware Engineer
    Join Date
    Sep 2001

    Question Can't tell...

    The answer is somewhere else in the code.

    How are your hex skills? Each of these flags is represented by one bit... Each of those hex values has a single bit = one, with the remaining bits = zero.

    For example 0x0002 (hexadecimal) = 0000 0000 0000 0010 (binary)

Popular pages Recent additions subscribe to a feed
Website Security Test