Skip to content

Instantly share code, notes, and snippets.

@andymatuschak
Created October 12, 2009 21:54
Show Gist options
  • Save andymatuschak/208791 to your computer and use it in GitHub Desktop.
Save andymatuschak/208791 to your computer and use it in GitHub Desktop.
int *foo()
{
int x = 4;
return &x;
}
void tester()
{
int *x = foo();
*x = 8; // NOT OKAY
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment