CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 1999
    Location
    France
    Posts
    393

    Is it possible to create class or type with bit field

    Hi,
    All is in the subject.

    In C/C++ i have a structure:

    typedef struct titi{
    unsigned char field1:1;
    unsigned char field2:1;
    unsigned char field3:2;
    unsigned char field4:1;
    }titi;

    now i have a program in VB that must fill this structure and put it in a binary file.
    But i don't know if bit field is possible in VB

    thanks!


  2. #2
    Join Date
    Jul 2000
    Location
    Milano, Italy
    Posts
    7,726

    Re: Is it possible to create class or type with bit field

    maybe binary type can help you
    ie:
    dim theBField() as binary
    Redim theBField(lendesired)
    have a look at binary files in msdn.

    Special thanks to Lothar "the Great" Haensler, Tom Archer, Chris Eastwood Bruno Paris and all the other wonderful people who made and make Codeguru a great place. Come back soon, you Gurus.
    ...at present time, using mainly Net 4.0, Vs 2010



    Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
    all the other wonderful people who made and make Codeguru a great place.
    Come back soon, you Gurus.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured