View Single Post
Join Date: Jan 2008
Posts: 77
Reputation: number87 is an unknown quantity at this point 
Solved Threads: 0
number87 number87 is offline Offline
Junior Poster in Training

Linked List of struct

 
0
  #1
Nov 20th, 2008
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.

  1. struct Event
  2. {
  3. void addEvent();
  4.  
  5. tm startTime, endTime;
  6. string eventItem;
  7. string eventNotes;
  8. char allDay;
  9. nodePtr head, tail;
  10.  
  11. };
  12.  
  13.  
  14. struct Node
  15. {
  16. Event eventNode;
  17. Node *next;
  18. };
  19.  
  20. typedef Node* nodePtr;
Reply With Quote