Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Nov 15th, 2012  |  syntax: C++  |  size: 0.17 KB  |  views: 35  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int f(const int& x, int* y)
  5. {
  6.     *y = 5;
  7.     return x;
  8. }
  9.  
  10. int main()
  11. {
  12.     int x = 10;
  13.     cout << f(x, &x) << endl;
  14. }