Thread: Self referencing structure

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Feb 2009
    Posts
    278

    Self referencing structure

    I have a structure that contains a pointer to another instance of itself (like a linked list). However I'm getting an error that says I'm missing a ";" when I'm not...

    Code:
    typedef struct IOD {
      char Name[11];
      int  Request_Type;
      char *Transfer_Buffer;
      int  *Transfer_Counter;
      IOD  *Next_IOD;
    } IOD;
    I think I need some sort of prototype struct but I'm unsure how to do this.
    Last edited by Bladactania; 04-22-2009 at 11:33 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem referencing structure elements by pointer
    By trillianjedi in forum C Programming
    Replies: 19
    Last Post: 06-13-2008, 05:46 PM
  2. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 06:39 AM
  3. Serial Communications in C
    By ExDigit in forum Windows Programming
    Replies: 7
    Last Post: 01-09-2002, 10:52 AM
  4. referencing structure variables
    By sballew in forum C Programming
    Replies: 1
    Last Post: 11-01-2001, 01:56 PM
  5. referencing C structure elements in assembly
    By BigAl in forum C Programming
    Replies: 7
    Last Post: 09-10-2001, 03:19 PM