Hi all..
This might sound like a bit of "n00b" question and almost embarrassing to as I'm sure I should have learnt this way before some other stuff.. but how do you pass a struct to a function for both reading / writing?
Small example snippet of what I envisage code to look like. The struct is global, not that that matters I guess.. but not sure what to put for the function args![](/static/smilies/shy.gif)
The original 'foo' struct should now be modified with the new values for calling later in the app.
Any info appreciated![](/static/smilies/smile.gif)
Regards,
Ian
This might sound like a bit of "n00b" question and almost embarrassing to as I'm sure I should have learnt this way before some other stuff.. but how do you pass a struct to a function for both reading / writing?
Small example snippet of what I envisage code to look like. The struct is global, not that that matters I guess.. but not sure what to put for the function args
![](/static/smilies/shy.gif)
struct _foo {
AnsiString foo, bar, baz;
} foo;
UpdateStruct(foo);
void __fastcall UpdateStruct(???) {
foo.foo = "bar";
foo.bar = "baz";
foo.baz = "foo";
}
The original 'foo' struct should now be modified with the new values for calling later in the app.
Any info appreciated
![](/static/smilies/smile.gif)
Regards,
Ian