Sign in to follow this  

Structure within a structure

Recommended Posts

Hey guys, i need some really quick help, im supposed to be implementing a tree data type, anyhoo, i have prob so i have
struct catergory_element
 char catergory_title[20]
 catergory *next_cat
 struct element
 char element_name[20]
 element *next
ok so im trying to create a catergory, with N amount of elements so eg: +MOVIES -terminator -titanic -matirx etc. OK, problem is i cant exactly reach the members of the struct element, what i mean by this is, in a certain funtion i have catergory *start_c = NULL; element *start_e = NULL; catergory works, however element part doesnt, i even tried catergory.element *start_e = NULL, nothing works!!! how could i reach the struct in the struct?

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this