Mean Lugruf >
So you said a different method. Do you mean a function of a class for each item? Like a class named Item and int Banana? Cause that seems really easy. If you need to programmically generate a container for each item (as in you don't know what the item name is when it's input), you could try to use a linked list as long as they follow the same format. Another option is some sort of table, like a hash table or SQL table, but that might be more work than you need.
Was that any help Spine?