Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- class One;
- class ForTest;
- class One
- {
- public:
- One(ForTest *inFT) : theForTest(inFT) {};
- ForTest *theForTest;
- };
- class ForTest
- {
- public:
- ForTest() : be(2), theOne(this) {};
- int be;
- One theOne;
- };
- int main(void)
- {
- printf("start\n");
- ForTest first;
- first.be = 15;
- printf("fortest = %d\n", first.theOne.theForTest->be);
- printf("end\n");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement