+ 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

16th Feb 2019, 8:33 AM
Ayush Sinha
Ayush Sinha - avatar
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.
16th Feb 2019, 9:47 AM
Tibor Santa
Tibor Santa - avatar
+ 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
16th Feb 2019, 9:16 AM
Anna
Anna - avatar