Thread: classes, structs and unions

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Join Date
    Apr 2008
    Location
    USA
    Posts
    76
    You can also use unions to initialize arrays within classes/structs.

  2. #2
    and the hat of sweating
    Join Date
    Aug 2007
    Location
    Toronto, ON
    Posts
    3,545
    Quote Originally Posted by rudyman View Post
    You can also use unions to initialize arrays within classes/structs.
    Do you have an example of that?
    I've never found any need to use a union, ever; so I'm wondering if you're talking about a unique case I haven't encountered yet, or if there's a better way than using a union?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Unions & Structs... Puzzled.
    By Sparrowhawk in forum C Programming
    Replies: 10
    Last Post: 12-14-2008, 04:45 PM
  2. unions and structs
    By Ron in forum C Programming
    Replies: 24
    Last Post: 07-24-2008, 10:54 PM
  3. Possible to create methods for data in structs?
    By eccles in forum C Programming
    Replies: 19
    Last Post: 12-15-2004, 09:46 AM
  4. why unions and structs couldnt be initialized ?
    By black in forum C++ Programming
    Replies: 5
    Last Post: 11-11-2002, 05:05 AM
  5. Structs and Unions
    By Encrypted in forum C Programming
    Replies: 4
    Last Post: 11-05-2002, 03:53 AM