Well....
Well, you've created a catalog with 100 spaces. You've not put anything into that catalog though. So you'll probably want to go ahead and do that for three items....
(Reduce 100 to 3 temporarily).
1 2 3
|
//...
products cat [3];
//...
|
Now at the very least you'll want to put some items in there. So each item in the array can hold an Item, a Quantity and a cost.
So lets say we have some items. We have 3 books, 2 cups and a toilet.
Each of these, is an item in the array, three different objects, three array places.
1 2 3
|
cat[0].quantity = 3; //Three books
cat[0].item = ; //I'm assuming you want a SKU code here personally I'd have used a name but meh
cat[0].cost = 1.50;
|
Congrats we now have an item.
Now as for getting an individual price...well... does the cost refer to each item or is it a total?
It's the total, you'll need...
But you can skip the /3 if it's each.
I highly recommend messing with: http://www.cplusplus.com/doc/tutorial/structures/