I cant get the following code compiled. The following code is an abstraction of the problem I met in my development. How do you usually solve this kind of problem in your project?
test1.h
1 2 3 4 5 6 7 8 9 10 11 12 13
#ifndef TEST1_H
#define TEST1_H
#include "test2.h"
class Test2;
class Test1 {
public:
typedefstruct Nested {} N;
};
#endif
test2.h
1 2 3 4 5 6 7 8 9 10 11 12 13
#ifndef TEST2_H
#define TEST2_H
#include "test1.h"
class Test1;
class Test2 {
public:
Test1::N m;
};
#endif