Multilevel inheritance in c++ (CRTP)
Please help me solve this problem. WhiteDragon is to call Dragon::attacks() instead of MonsterImplement::attacks() , and there is ambiguity error here. If I change Dragon to be derived from MonsterImplement, then the line std::cout << monster->numAttacks << std::endl; won't compile because Dragon has no numAttacks data member (nor should it, because different types of Dragons are to have different values). So I need WhiteDragon to call Dragon::attacks() and to call finalizeMonster() during its instantiation. If I make Dragon virtual derived class of Monster, WhiteDragon calls up