|
-
November 23rd, 2007, 09:51 AM
#1
structs pointing to each other; compile problem
Hei!
I have defined two structure types. Each has a parameter that is a pointer to the other structure, and, of course, it does not compile. How can I come over this problem? This structure definition will result in a very efficient coding, so I would like to keep it.
Example:
typedef struct Item_s{
int param1;
int param2;
std::list<EntryList_T::iterator> entryPtrList;
}Item_T;
typedef std::list<Item_T> ItemList_T;
typedef struct Entry_s{
uint id;
ItemList_T::iterator item_iter;
}Entry_T;
typedef std::list<Entry_T> EntryList_T;
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|