Accessing initialized variable on different class C++
- by d0pe
I'm having some difficulties with this problem.
The main idea is, I initialized a variable of class type B in class A, class A.h has the variable Z declared as public, like B *Z;
In class A.cpp, I initialized it as Z = new B();
Now, I want to access that variable from class C and I'm unable to do so. C.h includes A.h and B.h