#include <string>
using namespace std;
class Item
{
private:
string name;
string desc;
int itemId;
public:
Item(int id, string itemname, string description)
: itemId(id)
, name(itemname)
, desc(description)
{
}
};
class Weapon
: public Item
{
private:
string name;
string desc;
int itemId;
int special;
public:
Weapon(int id, string itemname, string description, int attack)
: Item(itemId, name, desc)
, special(attack)
{
}
};
int main()
{
Weapon test{ 1, "jeezum", "hdahdhd", 33 };
}
I2luY2x1ZGUgPHN0cmluZz4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmNsYXNzIEl0ZW0Kewpwcml2YXRlOgoJc3RyaW5nIG5hbWU7CglzdHJpbmcgZGVzYzsKCWludCBpdGVtSWQ7CnB1YmxpYzoKCUl0ZW0oaW50IGlkLCBzdHJpbmcgaXRlbW5hbWUsIHN0cmluZyBkZXNjcmlwdGlvbikKCTogaXRlbUlkKGlkKQoJLCBuYW1lKGl0ZW1uYW1lKQoJLCBkZXNjKGRlc2NyaXB0aW9uKQoJewoJfQp9OwoKY2xhc3MgV2VhcG9uCjogcHVibGljIEl0ZW0Kewpwcml2YXRlOgoJc3RyaW5nIG5hbWU7CglzdHJpbmcgZGVzYzsKCWludCBpdGVtSWQ7CglpbnQgc3BlY2lhbDsKcHVibGljOgoJV2VhcG9uKGludCBpZCwgc3RyaW5nIGl0ZW1uYW1lLCBzdHJpbmcgZGVzY3JpcHRpb24sIGludCBhdHRhY2spCgk6IEl0ZW0oaXRlbUlkLCBuYW1lLCBkZXNjKQoJLCBzcGVjaWFsKGF0dGFjaykKCXsKCX0KfTsKCmludCBtYWluKCkKewoJV2VhcG9uIHRlc3R7IDEsICJqZWV6dW0iLCAiaGRhaGRoZCIsIDMzIH07Cn0K