+ 1

abstract classes and pure virtual class

https://www.sololearn.com/compiler-playground/cCRXRMikRcAR in this code attack was a pure virtual class. i wanted to turn it into a normal func but it gives no output. where am i doing wrong?

22nd Dec 2022, 7:13 PM
Lalala
Lalala - avatar
1 Answer
+ 3
Currently attack is normal function only. that's why calling base class function. You need to make pure virtual function. so replays it by virtual void attack() = 0; instead of void attack() { };
22nd Dec 2022, 7:29 PM
Jayakrishna 🇼🇳