Advertisement
Guest User

MikelSV

a guest
Oct 20th, 2013
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.27 KB | None | 0 0
  1. class A{
  2.     A *_a;
  3.     int _c;
  4. public:
  5.     A(){ _a=0; _c=50; }
  6.  
  7.     A* b(){
  8.         if(!this) return 0;
  9.         return _a;
  10.     }
  11.  
  12.     int c(){
  13.         if(!this) return 0;
  14.         return _c;
  15.     }
  16.  
  17. };
  18.  
  19.  
  20. int main(){
  21.  
  22. A a;
  23. int v=a.b()->b()->c();
  24.  
  25.  
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement