Skip to content

natamun/42-cpp01

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

42-cpp01

The second C++ module of the 42 curriculum, focused on memory management and references.

This project covers memory allocation (stack vs. heap), pointers to members, references, switch statements, and function pointers.

Usage

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

cd ex00
make
./ex00

Exercises

  • ex00: References vs. pointers to class members.
  • ex01: Heap allocation, memory leaks, and destructors (Zombie).
  • ex02: Array of heap-allocated objects (Zombie Horde).
  • ex03: Switch statements and class composition (Weapon/HumanA/HumanB).
  • ex04: File reading/writing and string replacement.
  • ex05: Function pointers and enum-based dispatch (Harl).
  • ex06: Filtering function calls based on a severity level (Harl Filter).

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

Memory management and references in C++: heap, pointers, and function pointers.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors