CPP03 1.0
|
Implementation of the ClapTrap class. [詳解]
Implementation of the ClapTrap class.
This file provides the implementation for the member functions of the ClapTrap class. Compared to EX00, the key improvements are:
virtual
, ensuring correct destruction of derived class objects via base class pointers.attack()
function is now implemented as virtual
, allowing derived classes to override its behavior for polymorphism.getName()
getter method is implemented, providing controlled access to the private name
member, particularly useful for derived classes. ClapTrap.cpp に定義があります。