transform d03 ex01 assignation function in case of two constructors, tests of assignation and copy operation not successful

This commit is contained in:
Hugo LAMY
2022-02-19 12:01:43 +01:00
parent 817fac957b
commit 7e65467a27
10 changed files with 104 additions and 23 deletions

View File

@@ -49,7 +49,17 @@ int main() {
ClapTrap robot1("robot1");
ScavTrap robot2("robot2");
ScavTrap robot3("robot3");
ClapTrap robot4("robot4");
ScavTrap robotmp1("robot4");
ClapTrap robot4(robotmp1); // PBM : it says it's a ScavTrap but it has no guardGate()...
//robot4.guardGate();
ScavTrap robotmp2("robot5");
ScavTrap robot5(robotmp2);
robot5.guardGate();
// ClapTrap robotmp3("robot6"); // PBM : assignation doesn't work...
// ScavTrap robot6(robotmp3);
goAttack(robot1, robot2);
goAttack(robot2, robot1);