In terms of grouping items for vectors, it's entirely up to you. There are advantages to doing things either way, but you may be right that it would be easier to keep track of items in vectors rather than their properties. You could, for instance, create
You could also have an Item class that other classes inherit from to create
If you use inheritance, you could have basic item properties within the Item class and then have special item properties for the classes that inherit from the main class.
Given the small size of the XML file, I would suggest using your own method or looking at http://msdn.microsoft.com/en-us/library/ekw4dh3f(v=vs.71).aspx
I don't imagine you are wanting to create a true dataset, but that organization scheme may give you ideas.
If you want to vary the number of items in a chest, it would probably be easier to create a constructor that takes in an array or vector so you can vary the size of what is input rather than varying the number of variables the constructor takes in.
Code:
vector<Item> inventory
You could also have an Item class that other classes inherit from to create
Code:
vector<Weapon> weaponInventory
If you use inheritance, you could have basic item properties within the Item class and then have special item properties for the classes that inherit from the main class.
Given the small size of the XML file, I would suggest using your own method or looking at http://msdn.microsoft.com/en-us/library/ekw4dh3f(v=vs.71).aspx
I don't imagine you are wanting to create a true dataset, but that organization scheme may give you ideas.
If you want to vary the number of items in a chest, it would probably be easier to create a constructor that takes in an array or vector so you can vary the size of what is input rather than varying the number of variables the constructor takes in.