1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

Research: Learn about the function call

This commit is contained in:
winlin 2020-10-29 12:02:33 +08:00
parent a060befebf
commit a7961e558b
2 changed files with 56 additions and 0 deletions

View file

@ -0,0 +1,22 @@
/*
g++ frame0.cpp -g -O0 -o frame && ./frame
*/
#include <stdio.h>
#include <stdlib.h>
int callee(int a, long b) {
int c = a;
c += (int)b;
return c;
}
void caller() {
int v = callee(10, 20);
printf("v=%d\n", v);
}
int main(int argc, char** argv)
{
caller();
return 0;
}