I have such code 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) return me such error - "Undefined structure 'Connection'".
Can anyone help me with my problem?
@ereOn, struct Connection; struct User; struct Connection { Users::iterator user; }; typedef list Connections; typedef list Users;
struct User {
Connections::iterator connection;
};
Undefined structure 'User'