just like an array means this data structure support return the element of certain index in O(1) times.different types mean both builtin type and user defined class which should use reference.
for example, A is the class which have made this structure down. The b,c is instance of different classes. And the A should support follow operate:
A a(10);//apply for storage of 10 elements
a[0]=120;
a[1]=’a’;
a[2]=”adsad”;
a[3]=b;
a[3]=c;
a[1]=c;
a[2]=123.5;
…
this question is not for the practical use, just for the curiosity.
now I have known how can solve this. it is really cool:D