i have two classes A and B, i need them to have the access to each other.
in file a.h:
include "b.h"
class A{
private B *b;
}
in file b.h
include "b.h"
class B{
private A *a;
}
compile give me the error said :
1>A.cpp
A: error C2143: syntax error : missing ';' before '*'
A: error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
A: error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
2>B.cpp
B: error C2143: syntax error : missing ';' before '*'
B: error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
B: error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
Bookmarks