Skip to content

Instantly share code, notes, and snippets.

@joest67
Created April 10, 2014 03:39
Show Gist options
  • Save joest67/10340737 to your computer and use it in GitHub Desktop.
Save joest67/10340737 to your computer and use it in GitHub Desktop.
void exch(int &a, int &b)
{
int temp = a;
a = b;
b = temp;
}
void exch(int *a, int *b)
{
int temp = *a;
*a = *b;
*b = temp;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment