Message306730
In the example code, the 'result' variable is declared on the stack in the callback() function. So it will be effectively when callback() returns.
Also the "result" variable in main() is never referenced. A pointer main()'s "result" variable should be passed to callback() as an argument ("&result") and `callback(struct helloStruct *result)` should populate it (via `result->i = 10;` etc)
```struct helloStruct callback () {
struct helloStruct result;
result.i = 10;
result.f = 3.14159;
return result;
}``` |
|
Date |
User |
Action |
Args |
2017-11-22 13:42:21 | Pam.McANulty | set | recipients:
+ Pam.McANulty, theller, amaury.forgeotdarc, gholling, Albert.Zeyer, Mason.Bially |
2017-11-22 13:42:20 | Pam.McANulty | set | messageid: <1511358140.95.0.213398074469.issue5710@psf.upfronthosting.co.za> |
2017-11-22 13:42:20 | Pam.McANulty | link | issue5710 messages |
2017-11-22 13:42:20 | Pam.McANulty | create | |
|