fork download
  1. #include <iostream>
  2.  
  3. class yoba {
  4. public:
  5. int test1, test2;
  6. yoba *yobject;
  7. };
  8.  
  9. int main() {
  10. yoba yobishe;
  11. yobishe.test1 = 1;
  12. yobishe.test2 = 2;
  13.  
  14. yoba yobatest;
  15. yobatest.yobject = &yobishe;
  16.  
  17. std::cout << yobatest.yobject->test1 << ' ' << yobatest.yobject->test2;
  18.  
  19. return 0;
  20. }
Success #stdin #stdout 0s 3412KB
stdin
Standard input is empty
stdout
1 2