Skip to content

Getting to know constructors, desctructors, pointers and references in a zombie simulator and a simple fight simulator.

Notifications You must be signed in to change notification settings

jakobsitory/04_CPP01_42CC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

C++ Module 01

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.

Exercises

ex00 - BraiiiiiiinnnzzzZ

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.

ex01 - Moar brainz!

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.

ex02 - HI THIS IS BRAIN

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++.

ex03 - Unnecessary violence

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 the Weapon class.
  • Simulating a simple combat scenario.

ex04 - Sed is for losers

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++.

ex05 - Harl 2.0

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.

ex06 - Karen 2.0

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.

Installation

To install the project, follow these steps:

  1. Clone the repository: git clone git@github.com:jakobsitory/04_CPP01_42CC.git
  2. Navigate to the project directory: cd 04_CPP01_42CC
  3. Navigate to the exercise directory : cd ex00, cd ex01 ...
  4. Build the project: make

Usage

Follow the on-screen instructions for each program to manage and display information about zombies.

ex00 - BraiiiiiiinnnzzzZ

./Zombie

ex01 - Moar brainz!

./ZombieHorde

ex02 - HI THIS IS BRAIN

./Brain

ex03 - Unnecessary violence

./NoViolence

Sed is for losers

./Filestream

ex05 - Harl 2.0

./harl

ex06 - Karen 2.0

./harl

About

Getting to know constructors, desctructors, pointers and references in a zombie simulator and a simple fight simulator.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published