我是C++的新手,想尝试一下类。我的代码我的世界有英雄有剑。英雄携带宝剑。这应该不会太难。//DefiningswordsclassSword{//Themostimportantthingaboutaswordisitslength.intlenght;public://onlyconstructoranddestructorSword(intswordlength){lenght=swordlength;};~Sword(){};};//definingheros(aspeoplewithmagicswords)classHero{Swordmagic_sword;public:/