Originally Posted by
Lindley
It sounds to me like you want a std::map< std::string, Weapon >. That's the closest you can get to what you seem to be trying to do.
Alternatively, you could look into inheritance, for instance defining ShortSword as a subclass of Weapon. That wouldn't be worthwhile unless you had a number of different ShortSword objects you expected to be manipulating with various properties.
From your questions, I'm wondering whether you really understand what object scope is all about.