C Programming on the Mac L37 - Unions

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
833 views
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Nov 20, 2010

How to use unions in C. Also using them inside structs.

  • likes, 0 dislikes

Link to this comment:

Share to:

Uploader Comments (AppleProgramming)

  • Interesting... I can almost imagine where you would use this, but not really... Is there a restriction on what you can put in a Union? Could I put things like UITableViewController or UIImage or just scalar?

  • @randomblink To be honest I have never tried. It really wouldn't be helping much (if it did work) I don't think because you would only have 2 pointers, you wouldn't actually be allocating the memory for each object in the union. So I would say in theory yes, but I doubt it would be useful.

see all

All Comments (3)

Sign In or Sign Up now to post a comment!
  • I really enjoy your vids.

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more