fork download
  1. #include<ostream>
  2.  
  3. void Unknown(int *p, int num);
  4. void HardToFollow(int *p, int q, int *num);
  5.  
  6. void Unknown(int *p, int num) {
  7. int *q;
  8.  
  9. q = &num;
  10. *p = *q + 2;
  11. num = 7;
  12. }
  13.  
  14. void HardToFollow(int *p, int q, int *num) {
  15. *p = q + *num;
  16. *num = q;
  17. num = p;
  18. p = &q;
  19. Unknown(num, *p);
  20. }
  21.  
  22. int main()
  23. {
  24. int *q;
  25. int trouble[3];
  26.  
  27. trouble[0] = 1;
  28. q = &trouble[1];
  29. *q = 2;
  30. trouble[2] = 3;
  31.  
  32. HardToFollow(q, trouble[0], &trouble[2]);
  33. Unknown(&trouble[0], *q);
  34. cout << *q << " " << trouble[0] << " " << trouble[2];
  35. return 0;
  36.  
  37. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:34:3: error: ‘cout’ was not declared in this scope
   cout << *q << " " << trouble[0] << " " << trouble[2];
   ^~~~
stdout
Standard output is empty