Structure of a structure

This is a discussion on Structure of a structure within the C Programming forums, part of the General Programming Boards category; Hello World! Code: Structure.member Okay here is the deal: i get that with this i statement i can reach the ...

  1. #1
    Registered User
    Join Date
    Jul 2008
    Location
    Denmark
    Posts
    22

    Wink Structure of a structure

    Hello World!

    Code:
    Structure.member
    Okay here is the deal: i get that with this i statement i can reach the value "member" associated the single structure "structure". But when the statement looks like this:

    Code:
    Structure.member.member2
    Example:

    Code:
    addr.sin_addr.s_addr
    What do i reach?

  2. #2
    Deathray Engineer MacGyver's Avatar
    Join Date
    Mar 2007
    Posts
    3,211
    I don't understand the question. Looks straightforward to me. If member is a struct, then you're accessing a member of member.....

  3. #3
    Registered User
    Join Date
    Jul 2008
    Location
    Denmark
    Posts
    22
    Ohhh yearh........ Sorry stupid question

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem referencing structure elements by pointer
    By trillianjedi in forum C Programming
    Replies: 19
    Last Post: 06-13-2008, 05:46 PM
  2. Replies: 5
    Last Post: 02-14-2006, 08:04 AM
  3. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 06:39 AM
  4. Serial Communications in C
    By ExDigit in forum Windows Programming
    Replies: 7
    Last Post: 01-09-2002, 09:52 AM
  5. C structure within structure problem, need help
    By Unregistered in forum C Programming
    Replies: 5
    Last Post: 11-30-2001, 04:48 PM

Tags for this Thread


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