Skip to content

Instantly share code, notes, and snippets.

@Keith-S-Thompson
Created September 24, 2013 22:57
Show Gist options
  • Save Keith-S-Thompson/6692473 to your computer and use it in GitHub Desktop.
Save Keith-S-Thompson/6692473 to your computer and use it in GitHub Desktop.
#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