To save some space in my code, I made this typedef:
typedef clients.members.at(selectedTab) currentMember;
however, g++ gives me this error:
error: expected initializer before '.' token
I figure that I’m misusing typedef, since clients.members.at(selectedTab) is a function call and not a type. Is there a way to do what I’m trying to do here?
If this is used function-local and neither
clients.membersnorselectedTabchange between its uses, just use references. E.g.: