String Array

 
Hello
How do I setup an array, stuff it with the following, and then display the data using print() with the following data. The array could be called animals.

Column 1 Column 2
cat 1.6
dog 2.78
fish 9.9
ants 7

Thanks so much
Steve
 
just create 2 similar arrays:

string col1[4];
double col2[4];

so these 2 will go in pairs.

   Print(col1[i]," - ",col2[i]);
 
irusoh1 wrote:
just create 2 similar arrays:

string col1[4];
double col2[4];

so these 2 will go in pairs.

Print(col1[i]," - ",col2[i]);

Right but I was hoping to use a 2 column so that I could sort on the numeric field. That was my great idea!
Thanks
Steve
 
string col1[4];
double col2[4][2];
 
for(int i=0; i<4; i++)
   col2[i][1]=i;
...
for(i=0; i<4; i++)
   Print(col1[col2[i][1]]," - ",col2[i][0]);
Reason: