![]() |
| ||
| Linked List of struct I am creating a linked list which links a struct of data together. However, this is my problem, if I declare struct Node first then the Event type wont exist, but if I declare struct Event first then nodePtr wont exist....im kinda stuck here as to how I should declare them. struct Event |
| ||
| Re: Linked List of struct Not sure of what you want to accomplish here. This piece of info might help getting the same results using a different method. |
| ||
| Re: Linked List of struct ok what im trying to do have a list of Events (which are actually a struct type containning data such as time date etc). And my problem as can be seen above is that I do not know how to resolve their declarations. I cant declare struct Event first because it contains pointers to the next Event struct. And I cant declare struct Node first because the node is of Event type. |
| ||
| Re: Linked List of struct struct Event |
| ||
| Re: Linked List of struct Maybe, you confused the functionality of Event struct and Node struct. There are two ways to reach you objective. First, struct EventNode another way use the list of STL to store the event. struct Event |
| ||
| Re: Linked List of struct ah ok i get what u mean |
| All times are GMT -4. The time now is 5:55 pm. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC