+ 4
Compilation error [C++]
I'm getting compilation error in my program. Please don't use the technical words bcz I'm just new in c++.đ https://code.sololearn.com/cJ7PdSdk0WHe/?ref=app
2 Answers
+ 5
In addition to the comments of Anna , your AttackingZombie function is already doing some printing and does not have a return value (as it is void). So you do not need another cout in the main function, just call the function plainly.
+ 3
Line 23: "apowet" => "apower"
Line 18: the method getpower() cannot access the parameter "apower" that was passed to the constructor. The instance variable is called "power"
Line 22 etc.: if(apower == (int)) looks wrong to me, but I'm bad with C++. Probably need to replace it with something like if(typeid(apower) == typeid(int()))
Line 54: "intbaaccuracy"? Probably not. Make sure to remove all spelling errors. The compiler won't guess what you mean