Skip to content

This module explores fundamental C++ concepts including memory allocation, pointers, references, and file operations.

Notifications You must be signed in to change notification settings

aronbergman/cpp-01

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Screenshot from 2025-01-16 16-42-47

CPP Module 01

This module explores fundamental C++ concepts including memory allocation, pointers, references, and file operations.

Exercises Overview

ex00: BraiiiiiiinnnzzzZ

Implementation of a Zombie class with different memory allocation approaches:

  • Stack allocation (automatic memory management)
  • Heap allocation (manual memory management)

ex01: Moar brainz!

Creating and managing multiple zombies using array allocation.

ex02: HI THIS IS BRAIN

Demonstration of pointers and references in C++, showing different ways to access memory.

ex03: Unnecessary violence

Implementation of weapon system with two human classes demonstrating different approaches to weapon handling.

ex04: Sed is for losers

File manipulation program that replaces occurrences of strings in a file.

ex05: Harl 2.0

Implementation of a complaint system using member function pointers.

Memory Management Tools

To check for memory leaks, use:

valgrind --leak-check=full ./your_program

Or use Address Sanitizer during compilation:

g++ -fsanitize=address -g your_files.cpp -o your_program

Important Concepts

  • Stack vs Heap allocation
  • Proper memory management (new/delete pairing)
  • File operations in C++
  • Pointers to member functions

About

This module explores fundamental C++ concepts including memory allocation, pointers, references, and file operations.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published