Question: Fix my errors please there are few errors i belive have in my code that im going point out and i want you to just
Fix my errors please there are few errors i belive have in my code that im going point out and i want you to just fix it and do nothing else in code. here's the code std::vector projectiles;
Mindflayer::Variant type;
if lineInformation "PSIONIC"
type Mindflayer::PSIONIC;
else if lineInformation "TELEPATHIC"
type Mindflayer::TELEPATHIC;
else
type Mindflayer::ILLUSIONARY;
Check if the string at index is not "NONE"
if lineInformation "NONE"
while lineInformationfind; std::string::npos
Mindflayer::Projectile a;
atype lineInformationsubstr lineInformationfind;
aquantity std::stoi
lineInformationsubstr
lineInformationfind
lineInformationfind; lineInformationfind
;
projectiles.pushbacka;
lineInformation lineInformationsubstrlineInformationfind;;
Mindflayer::Projectile a;
atype lineInformationsubstr lineInformationfind;
aquantity std::stoilineInformationsubstrlineInformationfind;
projectiles.pushbacka;
TYPE, NAME, CATEGORY, HITPOINTS, LEVEL, TAME, ELEMENTFACTION HEADS, FLIGHTTRANSFORMSUMMONING DECAY, AFFINITIES, PROJECTILES
Creature::Category category;
if lineInformation "ALIEN"
category Creature::ALIEN;
else if lineInformation "MYSTICAL"
category Creature::MYSTICAL;
else if lineInformation "UNDEAD"
category Creature::UNDEAD;
else
category Creature::UNKNOWN;
csize new MindflayerlineInformation category,
std::stoilineInformation std::stoilineInformation std::stoilineInformation
projectiles,std::stoilineInformation affinities;
and the errors that im having are for this line atype lineInformationsubstr lineInformationfind; error is assigning to 'Variant' from incompatible type 'string'gcc
no suitable conversion function from std::::basicstring, std::::allocator to "Mindflayer::Variant" existsCC
std::::vector lineInformation. because this is my mindflayer class Mindflayer : public Creature
public:
enum Variant PSIONIC TELEPATHIC, ILLUSIONARY;
struct Projectile
Variant type;
int quantity;
; it's type is in member of Variant enum function and my cavern code it's string and make it Variant enum please, make necessary changes on and the error is also causing because of the same issue atype lineInformationsubstr lineInformationfind; error assigning to 'Variant' from incompatible type 'string'gcc
no suitable conversion function from std::::basicstring, std::::allocator to "Mindflayer::Variant" existsCC
std::::vector lineInformation so fix both of it and also look at implementation and look out for any errors on implemntation if i made any mistakes PROJECTILES: Only applicable to Mindflayers. PROJECTILES are of the form PROJECTILE TYPEQUANTITY;PROJECTILE TYPE QUANTITY where multiple types of projectiles are separated by a semicolon. The value may be NONE for a Mindflayer with no projectiles, or creatures of other subclasses.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
