Hi,
is there a way to quickly access members of a struct without naming the struct every single time?
here's a code example of what I mean
Code:
struct myStruct {
int ia, ib, ic, id, ie, ig;
bool bIsItTrue;
}
Now to access some of the structs members I would need to do something like this:
Code:
doSomethingWithSomeStructMembers(myStruct.ia, myStruct.ie, myStruct.ig, myStruct.bIsItTrue);
Is there any way I can tell the compliler that all of the following variables refer to the struct, if they match the name of a member of the struct ?
What it could look like (this code does not work of course, I wouldn't ask if it did )
Code:
with myStruct {
doSomethingWithSomeStructMembers(ia, ie, ig, bIsItTrue);
}
I did a search on this topic, but it's really hard to search something if you don't know it's name.