Thread: Passing Bit Fields

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    May 2006
    Posts
    35

    Passing Bit Fields

    Is there a way to return bit fields via class methods? ..Or even typedef them?...Or maybe even (void) pointers to them?

    example:
    Code:
     
    class BitField
    {
       typedef unsigned:28  Bytes7
       public:
       unsigned:28 getBits(){ return bits; }
       unsigned bits:28;
    };
    If nothing else, a native data type 28 bits or larger?
    Last edited by computation; 09-26-2006 at 06:28 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Bit fields
    By Perspektyva in forum C++ Programming
    Replies: 13
    Last Post: 11-22-2008, 02:38 PM
  2. 64 bit testing
    By DrSnuggles in forum C++ Programming
    Replies: 7
    Last Post: 11-20-2007, 03:20 AM
  3. bit patterns of negtive numbers?
    By chunlee in forum C Programming
    Replies: 4
    Last Post: 11-08-2004, 08:20 AM
  4. Create data type
    By Malefaust in forum C Programming
    Replies: 2
    Last Post: 09-30-2004, 06:06 AM
  5. Array of boolean
    By DMaxJ in forum C++ Programming
    Replies: 11
    Last Post: 10-25-2001, 11:45 PM