Hello,
If I understand you correctly, you have 10 categories (called cars), and you want to collect data on the car.
You can use a struct to handle this, or make a simple standard that says the 1 storage unit will be the 1 car class, the second storage unit the second class... and go from there.
My guess is that you are going to want to store more than the car's weight.
Make a struct
struct data
{
string carname;
int weight;
}
And then you can make an array:
struct data CarData[10];
And then you can refrence them as you need them:
CarData[3].weight= the value of the weight of the third car.
Give it a shot, and post your code to see if you have it all.
Christian
kc0arf
Posting Virtuoso
1,937 posts since Mar 2004
Reputation Points: 121
Solved Threads: 57