This repository contains the exercises and projects designed to progressively introduce students to C++ programming, Object-Oriented Programming (OOP), memory management, and the Standard Template Library (STL).
The curriculum starts from basic concepts and gradually advances to complex programming patterns and algorithms, following the C++98 standard for foundational learning.
- Learn C++ syntax and best practices.
- Develop object-oriented programming skills (classes, inheritance, polymorphism).
- Master memory management (pointers, dynamic allocation, avoiding leaks).
- Learn to use the Standard Template Library (STL) effectively.
- Implement algorithms and data structures from scratch.
- Gain experience with error handling, debugging, and testing.
- Build clean, maintainable code with proper naming, modularization, and include guards.
- Introduction to C++ syntax.
- Variables, loops, conditionals, and functions.
- Basic compilation and Makefile usage.
- Classes, constructors, destructors.
- Copy constructors, assignment operators, and the Orthodox Canonical Form.
- Inheritance and polymorphism.
- Encapsulation and proper use of private/public members.
- Templates and generic programming.
- Operator overloading.
- More advanced class hierarchies and design patterns.
- Introduction to containers:
vector,list,map. - Iterators and basic algorithms.
- Using the STL to simplify tasks instead of manual implementation.
-
Exercises with real-world use cases:
- Bitcoin Exchange: file parsing, container usage.
- Reverse Polish Notation (RPN): stack-based expression evaluation.
- PmergeMe: implementing Ford-Johnson merge-insertion sort with multiple containers.
-
Focus on performance and container-specific behavior.
-
Measuring execution time and comparing container performance.
-
Compilation: All code must compile with
c++ -Wall -Wextra -Werror -std=c++98
-
Memory: No leaks allowed. Use
new/deleteproperly. -
Containers: Each container used in an exercise cannot be reused in the next.
-
Forbidden:
printf(),malloc(),free(),using namespace,friendkeyword. -
Header files: Must be independent, with proper include guards.
-
Makefile: Required for all exercises with standard targets:
all,clean,fclean,re.
- Focus is on learning through doing, not just finding answers.
- Peer learning is emphasized: discuss ideas, exchange approaches, and collaborate.
- AI tools may be used as learning aids, but direct copying is prohibited.
- The journey of understanding C++ deeply is valued over simply completing exercises.
Each exercise contains:
- Source files (
*.cpp), headers (*.hpp), and a Makefile. - Clear input/output requirements.
- Error handling and validation.
- Yassine Ajagrou – GitHub: [iaceene]