How to use enum within a struct in ANSI C? -
The following code is to be used in the main code, but I do not know how it is used.
START A few ITEM {enum {MOVIE, MUSIC} item type; Association (structure film * movie; composition music * music;};};
This structure is used in a dynamic link list with previous / item / next indicator, but not me Find out how you can set an enum or how to get started.
I have to know how this is seen in the main function.
biglist.someitem = ';; / * Declaration I * / struct Library * Use a large list;
To understand more code that I do Is trying to.
Still a rookie on ANSI C, do not hit me properly;)
< / Div>
You are using points everywhere, so you can use Mitigation requires -> refer to the item.
Meaning biglist-> Someitem-> ItemType = MOVIE;
The code below is compiled exactly with gcc -Wall-strict:
(Although this code will not run definitely because I have a large list and someitem No memory for me!)
Comments
Post a Comment