CPP04 1.0
|
Main entry point for C++ Module 04 Exercise 01. [詳解]
#include "Animal.hpp"
#include "Brain.hpp"
#include "Cat.hpp"
#include "Dog.hpp"
#include "ScopedPointer.hpp"
#include "WrongAnimal.hpp"
#include "WrongCat.hpp"
#include <cstdlib>
#include <iostream>
#include <new>
関数 | |
int | main () |
Main function to run all EX01 test scenarios. | |
Main entry point for C++ Module 04 Exercise 01.
This file serves as a comprehensive test driver for the Animal, Dog, Cat, and Brain classes. It particularly focuses on demonstrating deep copy behavior, proper memory management with dynamically allocated Brain objects, and continued polymorphism through inheritance. It includes tests for individual object creation, arrays of polymorphic objects, and the correctness of copy constructors and assignment operators.
main.cpp に定義があります。