Structures - Unions

This is a discussion on Structures - Unions within the C Programming forums, part of the General Programming Boards category; >If it takes you ten posts to understand what a union is, then there is no way on earth you're ...

  1. #16
    Banned
    Join Date
    May 2003
    Posts
    124
    >If it takes you ten posts to understand what a union is, then there is no way on earth you're going to understand what the GDK libraries are doing.

    Who said i didn't understand what a union is?

  2. #17
    Been here, done that.
    Join Date
    May 2003
    Posts
    1,161
    Originally posted by AProg
    >If it takes you ten posts to understand what a union is, then there is no way on earth you're going to understand what the GDK libraries are doing.

    Who said i didn't understand what a union is?
    Yeah, there were 3 post of confusion, and 7 responses for you to get the idea afterwards. Sounds like it may have worked.

    There is another use of union I've used:

    union{
    double dval;
    int ival[];
    char cval[];
    long lval[];
    float fval[];
    };

    This union can be used to display one value in another format. I've used it to, for example, load a float and display the bytes that make up the float.
    Definition: Politics -- Latin, from
    poly meaning many and
    tics meaning blood sucking parasites
    -- Tom Smothers

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 6
    Last Post: 09-21-2008, 05:18 PM
  2. Structures, Unions and Classes
    By Makoy in forum C++ Programming
    Replies: 2
    Last Post: 02-23-2004, 02:57 PM
  3. Unions and Structures
    By C-Struggler in forum C Programming
    Replies: 4
    Last Post: 03-06-2003, 11:28 AM
  4. Structures and unions
    By Paninaro in forum C Programming
    Replies: 6
    Last Post: 06-21-2002, 02:35 PM
  5. Replies: 7
    Last Post: 12-29-2001, 11:25 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21