Advertisement
Guest User

Untitled

a guest
Aug 16th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. void foo(int**);
  2. void bar(int**);
  3.  
  4.  
  5. main() {
  6. int** x;
  7. foo(x); // does something
  8. bar(x); // does something else
  9. }
  10.  
  11.  
  12.  
  13. //and here's how it can work under the covers:
  14. void foo(int** thing) {
  15. *thing = malloc(4);
  16. }
  17.  
  18. void bar(int** thing) {
  19. print(*thing);
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement