diff --git a/innerf.c b/innerf.c new file mode 100644 index 0000000..5bfcaec --- /dev/null +++ b/innerf.c @@ -0,0 +1,25 @@ +#include + +int main() { + int a = 0; + int b = 40; + int c = 2; + + inline void lf(register int* r) { + a += *r; + }; // semicolon(;) not needeed! + + /* + // Same as above... + inline auto void lf(register int* r); + inline void lf(register int* r) { + a += *r; + }; // semicolon(;) not needeed! + */ + + lf(&b); + lf(&c); + + printf("%d\n", a); +} +