This module explores fundamental C++ concepts including memory allocation, pointers, references, and file operations.
Implementation of a Zombie class with different memory allocation approaches:
- Stack allocation (automatic memory management)
- Heap allocation (manual memory management)
Creating and managing multiple zombies using array allocation.
Demonstration of pointers and references in C++, showing different ways to access memory.
Implementation of weapon system with two human classes demonstrating different approaches to weapon handling.
File manipulation program that replaces occurrences of strings in a file.
Implementation of a complaint system using member function pointers.
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
- Stack vs Heap allocation
- Proper memory management (new/delete pairing)
- File operations in C++
- Pointers to member functions