Skip to content

Instantly share code, notes, and snippets.

@NigoroJr
Created October 6, 2015 21:16
Show Gist options
  • Select an option

  • Save NigoroJr/55ec9e3625c54e34e853 to your computer and use it in GitHub Desktop.

Select an option

Save NigoroJr/55ec9e3625c54e34e853 to your computer and use it in GitHub Desktop.
#include <iostream>
int main(int argc, char const* argv[]) {
int foo();
int& bar();
int* baz();
delete &(bar());
delete baz();
return 0;
}
int foo() {
return 42;
}
int& bar() {
return *(new int);
}
int* baz() {
return new int;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment