This repository contains solutions to various C++ programming challenges from the 42 Berlin curriculum. Each module is designed to deepen students' understanding of different programming concepts and techniques.
A simple program that creates and manages a list of zombies.
Key objectives included:
- Creating a
Zombie
class. - Managing a list of zombies.
- Displaying information about each zombie.
Extends the previous zombie management program by adding dynamic memory allocation.
Key objectives included:
- Using dynamic memory allocation to create zombies.
- Managing the lifecycle of dynamically allocated zombies.
- Ensuring proper memory management to avoid leaks.
Working with pointers and references to manipulate and display string data.
Key objectives included:
- Creating and manipulating string data using pointers and references.
- Displaying addresses and values of string variables.
- Demonstrating an understanding of pointers and references in C++.
A Weapon
class and a Human
class to simulate a simple combat scenario.
Key objectives included:
- Implementing a
Weapon
class. - Implementing a
Human
class that uses theWeapon
class. - Simulating a simple combat scenario.
A simple text replacement program that mimics the behavior of the sed
command.
Key objectives included:
- Reading from and writing to files.
- Implementing a text replacement algorithm.
- Demonstrating file handling and string manipulation in C++.
A Harl
class that can log messages at different levels of severity.
Key objectives included:
- Implementing a
Harl
class with different logging levels. - Managing and displaying log messages based on severity.
- Demonstrating an understanding of function pointers and member function pointers.
Extends the Harl
class to handle more complex logging scenarios.
Key objectives included:
- Extending the
Harl
class to handle more complex logging scenarios. - Managing and displaying log messages based on severity and context.
- Demonstrating an understanding of advanced class design and function pointers.
To install the project, follow these steps:
- Clone the repository:
git clone git@github.com:jakobsitory/04_CPP01_42CC.git
- Navigate to the project directory:
cd 04_CPP01_42CC
- Navigate to the exercise directory :
cd ex00
,cd ex01
... - Build the project:
make
Follow the on-screen instructions for each program to manage and display information about zombies.
./Zombie
./ZombieHorde
./Brain
./NoViolence
./Filestream
./harl
./harl