1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int Foo(int * iOne, int & iTwo);
  6. int Foo2(int iOne, int iTwo);
  7. int Foo3(int * iOne, int iTwo);
  8.  
  9. void main()
  10. {
  11. int a(0);
  12. int b(1);
  13. int c(5);
  14.  
  15. Foo(&a, b);
  16. c = Foo(&b, a);
  17. a = Foo3(&c, b);
  18.  
  19. c++;
  20.  
  21.  
  22. cout << a << endl;
  23. cout << b << endl;
  24. cout << c;
  25. system("pause");
  26.  
  27.  
  28. }
  29.  
  30. int Foo(int * iOne, int & iTwo)
  31. {
  32. *iOne += 2;
  33. iTwo -= 3;
  34.  
  35. iTwo++;
  36. --iTwo;
  37.  
  38. *iOne = Foo2(*iOne, iTwo);
  39.  
  40. return *iOne;
  41. }
  42.  
  43. int Foo2(int iOne, int iTwo)
  44. {
  45. iOne += 10;
  46. iTwo = 6;
  47. iOne = iTwo;
  48. iTwo--;
  49.  
  50. return iOne+iTwo;
  51. }
  52.  
  53. int Foo3(int * iOne, int iTwo)
  54. {
  55. iTwo = 0;
  56. *iOne++;
  57. return iTwo;
  58. }