[ create a new paste ] login | about

Link: http://codepad.org/wFaWQrSE    [ raw code | output | fork ]

C++, pasted on Sep 27:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <iostream>

using namespace std;

int g_myInt = 5;
int& getIntReference() { return g_myInt; }

int myVarArgFunction( int a, int b ) {
  return a+b;
}

int main() {
  cout<<myVarArgFunction( 10, getIntReference() )<<endl;
  return 0;
}


Output:
1
15


Create a new paste based on this one


Comments: