Skip to content

Instantly share code, notes, and snippets.

@mawenbao
Last active August 29, 2015 14:00
Show Gist options
  • Save mawenbao/96dbd44c385764ed90b0 to your computer and use it in GitHub Desktop.
Save mawenbao/96dbd44c385764ed90b0 to your computer and use it in GitHub Desktop.
Simple example code for cpp call stack
int foo2(int a, long b, int c, int d, int e, int f, int g, int i) {
return a + b;
}
int foo(int &a, long b) {
int m = 1;
int o[3] = {0x1, 0x2, 0x3};
return foo2(0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x9);
}
int main() {
int z = 0xa;
int r = foo(z, 0xb);
return r;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment