This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
What about a struct return value: struct bar Function() ?
Thanks. Cezar
Hi Cezar,
(Hey, "Cezar", cool name.)
This should work:
struct Foo { int a,b,c; };
void PrintFoo(struct Foo foo) { printf("Foo:%d,%d,%d\n", foo.a, foo.b, foo.c); }
That's a pass-by-value.
Here's pass-by-pointer:
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |