alteixeira20/42_cpp

★ 0Forks 0C++GitHub ↗Compare

README

C++98 badge Classes badge Inheritance badge Polymorphism badge Exceptions badge Templates and STL badge

42 C++ Modules

A single, tidy hub for Modules 00–09 of the 42 Porto C++ cursus.

Table of Contents

  1. At a Glance
  2. Modules & Scope
  3. Repository Layout
  4. Workflow & Usage
  5. Core Skills
  6. Tooling & Standards
  7. Module Notes
  8. Credits

At a Glance

Highlights: Ten steps that build the C++ muscle for the rest of 42 and beyond.

  • Modules stack from streams and classes to inheritance, polymorphism, exceptions, templates, and STL.
  • Each stage pairs new syntax with design habits: ownership, RAII, deep copies, and safe casting.
  • Later modules force real-world patterns: container/iterator fluency, algorithmic thinking, and performance awareness.
  • Every folder has its own README to keep focus on the learning goals of that module.

Modules & Scope

Highlights: What each module teaches and where to find it.

  • Each module link opens its folder README for detailed goals, concepts, and notes.
Module Description
00 C++ basics: streams, namespaces, classes, orthodox forms, and static/const hygiene.
01 Memory ownership, stack vs heap, references/pointers, file streams, and switch-driven flows.
02 Operator overloading, fixed-point math, and Orthodox Canonical Form discipline.
03 Inheritance chains and diamond patterns with ClapTrap variants.
04 Runtime polymorphism, abstract bases, interfaces, and deep-copy brain management.
05 Exceptions, RAII mindset, and bureaucrat/form workflows with execution guards.
06 Casting toolbox (static_cast, dynamic_cast, reinterpret_cast, const_cast) plus serialization basics.
07 Function and class templates; generic utilities with safe iteration and bounds checking.
08 STL containers/algorithms in practice: span computation, iterable stacks, and bulk insertion patterns.
09 Full STL application: Bitcoin exchange parsing, RPN evaluation, and Ford–Johnson merge-insert sorting.

Repository Layout

Highlights: Where to start.

  • Module_XX/ – source, Makefile, and a module-specific README (added as each project is completed).
  • Root README – quick orientation, module intent, and navigation links.

Workflow & Usage

Highlights: How to approach each module without surprises.

  • Start with the module README to capture rules (C++98, forbidden functions, STL restrictions before Module 08).
  • Follow module guidance for build targets, usage examples, and test notes.
  • Work one module at a time and keep artifacts inside the matching Module_XX/.
  • Use provided Makefiles or add your own per module; compile with -Wall -Wextra -Werror and C++98 mode.

Core Skills

Highlights: Learning trajectory across the modules.

  • Solid OOP fundamentals: encapsulation, inheritance, and polymorphism with deep-copy discipline.
  • Resource safety: RAII patterns, exception handling, and ownership choices on stack vs heap.
  • Type expertise: fixed vs floating vs integral math, cast correctness, and template-based genericity.
  • STL fluency: containers, iterators, algorithms, and performance-aware implementations on real parsing tasks.

Tooling & Standards

Highlights: Expectations that stay constant.

  • C++98 compliance across all modules; no external deps beyond standard library and readline where allowed.
  • STL containers/algorithms reserved for Modules 08–09 as per subject rules.
  • Orthodox Canonical Form from Module 02 onward unless explicitly exempted.
  • Clean builds and memory hygiene are mandatory; leak checks encouraged (Valgrind/GDB side helpers).

Module Notes

Highlights: What to expect when opening a module.

  • Constructors/destructors are verbose for traceability; many exercises require printed lifecycle messages.
  • Module READMEs map code structure to subject requirements, call out edge cases, and include tester notes when relevant.
  • Tests live per module; expect iterator-range adders, exception branches, and deep-copy checks where applicable.

Contributors

alteixeira20

Issues