I have a class called Object, and a class called Weapon that is a sub class of Object.
How do I put a Weapon in this vector and have it recognized as type Weapon, not Object?
vector
…SetItem(Weapon &newobject)
inv_item.push_back(weapon);
…SetItem(Weapon &newobject) {
inv_item.push_back(newobject);
…