hi all,
i have some trouble to figure out how can i access the object like in this case
P.S. i have tried to simplify the code to just consider the on the main problem. Also, this code is not compilable.
thanks for each suggestion
i have some trouble to figure out how can i access the object like in this case
Code:
//file1.h
class T1{
T1();
~T1();
....
};
====
//file2.h
#include file1.h
class T2{
T2();
~T2();
T1 Test; // consider this object
mem_foo() // member function
....
};
=====
//file2.cpp
...
T2::mem_foo(){
foo(); // this function is declared in file1.h
}
=====
//file3.h
extern foo();
====
//file3.cpp
foo()
{
// here is my problem! how can i access the object "Test"
//which is declared in file2 in such case????
}
thanks for each suggestion
Comment