I have code like this with 2 structures:
#include <list>
using namespace std;
struct Connection;
struct User;
typedef list<Connection> Connections;
typedef list<User> Users;
struct User {
Connections::iterator connection;
};
struct Connection {
Users::iterator user;
};
But when I try to compile it, the compiler (C ++ Builder XE) returns me such an error - " Undefined structure" Connection ".
Can someone help me with my problem?
@ereOn, struct Connection; struct User; struct Connection {Users :: iterator user; }; typedef list Connections; List of users typedef;
struct User {
Connections::iterator connection;
};
Undefined Structure 'User'
source
share