Indicate the member of the struct

This is a discussion on Indicate the member of the struct within the C Programming forums, part of the General Programming Boards category; Originally Posted by Hannibal2010 Hi grumpy, So that is what I mean - I don't expect about memory size approach. ...

  1. #16
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by Hannibal2010 View Post
    Hi grumpy,
    So that is what I mean - I don't expect about memory size approach. I hope that C programming language has a special method to access to member of struct without care about member size.
    That would normally be... structname.membername ... the compiler works it out for you.

    But the bigger question is why on earth would you have a struct with so many members?
    What exactly are you trying to accomplish?

    Most often when I see code with many arrays or huge structs, it indicates structural problems with in the program... If you can give us a better description of your task we may be able to suggest a better solution...
    Last edited by CommonTater; 12-10-2011 at 09:54 AM.

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

Similar Threads

  1. Assign struct member value to struct member value
    By thahemp in forum C Programming
    Replies: 5
    Last Post: 10-13-2010, 10:48 AM
  2. printf of struct member
    By dassybr in forum C Programming
    Replies: 3
    Last Post: 11-21-2009, 03:22 PM
  3. struct member assignment (c-only)
    By emorrp1 in forum C Programming
    Replies: 8
    Last Post: 06-25-2008, 06:30 AM
  4. struct member name prefixing
    By oogabooga in forum C Programming
    Replies: 3
    Last Post: 01-11-2008, 11:37 AM
  5. Replies: 1
    Last Post: 05-05-2004, 07:58 AM

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