Skip to content

natamun/42-cpp04

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

42-cpp04

The fifth C++ module of the 42 curriculum, focused on polymorphism.

This project covers virtual functions, abstract classes, interfaces, and deep copy versus shallow copy, building on the inheritance concepts introduced in the previous module.

Usage

Each exercise (ex00 to ex02) contains its own Makefile. Compile and run individually:

cd ex00
make
./ex00

Exercises

  • ex00: Polymorphism and virtual functions across a class hierarchy of animals.
  • ex01: Deep copy vs. shallow copy, and proper resource management with dynamically allocated members.
  • ex02: Abstract classes and pure virtual functions.

Code Structure

Each exercise is self-contained in its own directory with its own source files, header, and Makefile, following the standard 42 module layout.

About

Polymorphism in C++: virtual functions and abstract classes

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors