Mandrew

Pointers are tricky

Sep 8th, 2012
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.18 KB | None | 0 0
  1. // mat wrote this not me
  2. typedef struct pkm;
  3. pkm bulba {int pid};
  4. pkm pBulba=&bulba;
  5.  
  6. // are these all the same?
  7. int tempPID=pBulba->pid;
  8. int tempPID=pBulba(*pid);
  9. int tempPID=bulba.pid;
Advertisement
Add Comment
Please, Sign In to add comment