View Single Post
Join Date: Mar 2008
Posts: 42
Reputation: littlestone is an unknown quantity at this point 
Solved Threads: 6
littlestone littlestone is offline Offline
Light Poster

Re: Linked List of struct

 
0
  #5
Nov 21st, 2008
Maybe, you confused the functionality of Event struct and Node struct.

There are two ways to reach you objective.
First,
  1. struct EventNode
  2. {
  3. tm startTime, endTime;
  4. string eventItem;
  5. string eventNotes;
  6. char allDay;
  7.  
  8. EventNode* next;
  9. };
  10.  
  11. struct EventList
  12. {
  13. void addEvent();
  14. ... // other member functions used to sustain the list
  15. private:
  16. EventNode* head;
  17. EventNode* tail;
  18. };

another way use the list of STL to store the event.

  1. struct Event
  2. {
  3. tm startTime, endTime;
  4. string eventItem;
  5. string eventNotes;
  6. char allDay;
  7. };
  8.  
  9. std::list<Event> eventList;
Reply With Quote