i have some trouble to figure out how can i access the object like in this case
Expand|Select|Wrap|Line Numbers
- //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