Created
September 24, 2013 22:57
-
-
Save Keith-S-Thompson/6692473 to your computer and use it in GitHub Desktop.
Better demo for http://stackoverflow.com/q/18993194/827263
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int agenext (int age); | |
int main () | |
{ | |
int age = 42; | |
cout << "age = " << age << "\n"; | |
agenext(age); | |
cout << "After calling agenext(age), age = " << age << "\n"; | |
} | |
int agenext (int x) | |
{ | |
cout << "entering agenext, x = " << x << "\n"; | |
x++; | |
cout << "agenext returning " << x << "\n"; | |
return x; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment