In C++, is there any data structure allow me to access the elements in array/vector through 2 methods? e.g.
int MemberParam[6];
I can access the element like MemberParam[0]..MemberParam[5]. However, if I know
0 is height (in CM)
1 is weight (in kg)
2 is age
3 is b-day (year)
4 is b-day (month)
5 is b-day (day)
Is there any data structure allow me to access the element in this way:
MemberParam.Weight
MemberParam.Height
while MemberParam.Weight actually point to MemberParam[1] ? so that I can access the array/vector element in different way depend on need ?
Thanks.
Regds
LAM Chi-fung