https://github.com/rogeriols/cpp-42sp
About A collection of small 42 school projects about C++.
https://github.com/rogeriols/cpp-42sp
42born2code 42cursus 42projects 42school cpp-modules cpp-modules-42 cpp98
Last synced: 9 months ago
JSON representation
About A collection of small 42 school projects about C++.
- Host: GitHub
- URL: https://github.com/rogeriols/cpp-42sp
- Owner: RogerioLS
- License: mit
- Created: 2024-11-25T23:24:09.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-23T15:13:45.000Z (9 months ago)
- Last Synced: 2025-03-29T06:45:03.487Z (9 months ago)
- Topics: 42born2code, 42cursus, 42projects, 42school, cpp-modules, cpp-modules-42, cpp98
- Language: C++
- Homepage:
- Size: 437 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# :speech_balloon: CPP | 42 SP
















Uma série de projetos rigorosamente alinhados com as normas da 42, que vai do **CPP 00** ao **CPP 09**, projetada para desenvolver habilidades em **Programação Orientada a Objetos** e **C++ moderno**.
### Estratégia de Estudo e Desenvolvimento
#### 1. Entender o Conceito
Antes de cada módulo, revisamos os conceitos principais abordados (como classes, polimorfismo, templates, etc.).
#### 2. Desenvolver com Qualidade
Criamos código limpo, documentado e em conformidade com as normas da 42.
#### 3. Testar e Refatorar
Garantimos que o código funcione perfeitamente e atenda aos requisitos do projeto.
---
### Resumo dos Módulos
#### **CPP Module 00**
- **Introdução ao C++**: classes, objetos, namespaces e boas práticas.
- **Objetivo**: Aprender a diferenciar entre atributos privados, públicos e o uso do `std::string`.
Module 00 - Namespace, class, member functions, stdio stream, initialization lists, static
- [ex00 - String manipulation and command-line argument handling](./CPP00/ex00/)
- [ex01 - Classes, Object instantiation, Basic I/O, String manipulation](./CPP00/ex01/)
- [ex02 - File recreation, C++ programming, Object-oriented design](./CPP00/ex02/)
**Resources:**
- **OOP in CPP:** [GeeksforGeeks](https://www.geeksforgeeks.org/object-oriented-programming-in-cpp/)
- **std::cin.getline() vs. std::cin:** [Stack Overflow](https://stackoverflow.com/questions/4745858/stdcin-getline-vs-stdcin)
- **atoi() in cpp strings:** [Stack Overflow](https://stackoverflow.com/questions/27640333/how-do-i-use-atoi-function-with-strings-in-c)
- **string.length() vs. string.size():** [Stack Overflow](https://stackoverflow.com/questions/31628940/which-is-faster-c-string-length-or-size)
- **Constructors in CPP:** [GeeksforGeeks](https://www.geeksforgeeks.org/constructors-c/)
- **Destructors in CPP:** [GeeksforGeeks](https://www.geeksforgeeks.org/destructors-c/)
- **C++: cin.getline - no instance of overload function:** [Stack Overflow](https://stackoverflow.com/questions/36459267/c-cin-getline-no-instance-of-overload-function)
- **C++ iomanip Library:** [YouTube](https://www.youtube.com/watch?v=JAEKyNfqm0A)
---
#### **CPP Module 01**
- **Alocação dinâmica**, construção e destruição de objetos.
- **Objetivo**: Implementar um sistema de contato usando classes e arrays.
Module 01 - Memory allocation, References, Pointers to members, File streams
- [ex00 - Classes, Member Functions, Pointers, Memory Allocation (stack vs. heap), Destructors](./CPP01/ex00/)
- [ex01 - Arrays of Objects, Memory Allocation (array of objects), Object Initialization](./CPP01/ex01/)
- [ex02 - Pointers, References, Memory Addresses](./CPP01/ex02/)
- [ex03 - Composition, Aggregation, Object Relationships, Constructors, Setters](./CPP01/ex03/)
- [ex04 - File I/O, Content copy to new file, Error Handling](./CPP01/ex04/)
- [ex05 - Member Functions, Pointers to Member Functions, Enumeration, Logging](./CPP01/ex05/)
- [ex06 - Switch Statement, Filtering, Logging](./CPP01/ex06/)
### Resources
- **References in CPP:** [GeeksforGeeks](https://www.geeksforgeeks.org/references-in-c/)
- **Pointer to member functions:** [CodeGuru](https://www.codeguru.com/cplusplus/c-tutorial-pointer-to-member-function/)
- **C++ Pointers - GeeksforGeeks:** [GeeksforGeeks](https://www.geeksforgeeks.org/cpp-pointers/)
- **How to Read File Line by Line in C++:** [Medium](https://medium.com/@teamcode20233/how-to-read-file-line-by-line-in-c-a1d829f697c0)
- **C++ File Handling: How to Open, Write, Read, Close Files in C++:** [Guru99](https://www.guru99.com/cpp-file-read-write-open.html)
---
#### **CPP Module 02**
- **Operadores sobrecarregados** e referências.
- **Objetivo**: Criar um sistema simples de controle de pontos flutuantes.
Module 02 - Ad-hoc polymorphism, operators overload, and canonical classes
- [ex00 - Fixed-point numbers, Orthodox Canonical Form](./CPP02/ex00/)
- [ex01 - Constructors (from int and float), Member Functions (toFloat, toInt), Operator Overloading](./CPP02/ex01/)
- [ex02 - Operator Overloading (Comparison, Arithmetic, Increment/Decrement), Static Member Functions (min, max)](./CPP02/ex02/)
### Resources
- **Introduction to Fixed Point Number Representation:** [CS61c Spring 2006](https://inst.eecs.berkeley.edu//~cs61c/sp06/handout/fixedpt.html)
- **Back To Basics! Fixed Point Numbers in C++:** [YouTube](https://www.youtube.com/watch?v=ZMsrZvBmQnU)
- **Understanding and Using Floating Point Numbers :** [Cprogramming](https://www.cprogramming.com/tutorial/floating_point/understanding_floating_point.html)
- **Printing floating point numbers - Cprogramming.com:** [Cprogramming.com](https://www.cprogramming.com/tutorial/floating_point/understanding_floating_point_printing.html)
- **Copy Constructor in C++ - GeeksforGeeks:** [GeeksforGeeks](https://www.geeksforgeeks.org/copy-constructor-in-cpp/)
- **Overloading the assignment operator - LearnCpp.com:** [LearnCpp.com](https://www.learncpp.com/cpp-tutorial/overloading-the-assignment-operator/?utm_content=cmp-true)
- **Floating and fixed point representation in C++:** [Medium](https://medium.com/@oumaimafisaoui/floating-and-fixed-point-representation-in-c-what-is-going-on-b71af54718a5)
- **Fixed Point Notation Basics :** [YouTube](https://www.youtube.com/watch?v=CONpWLc-tHA)
- **Decimal to Floating Point Conversion :** [YouTube](https://www.youtube.com/watch?v=ZrlQpzc61Vc)
- **IEEE 754 Standard for Floating Point Binary Arithmetic :** [YouTube](https://www.youtube.com/watch?v=RuKkePyo9zk)
- **OPERATORS and OPERATOR OVERLOADING in C++ :** [YouTube](https://www.youtube.com/watch?v=mS9755gF66w)
- **Overloading Increment and Decrement Operators in Postfix form :** [YouTube](https://www.youtube.com/watch?v=XJbA1AjW1zw)
- **Overloading ++ for both pre and post increment :** [stackoverflow](https://stackoverflow.com/questions/15244094/overloading-for-both-pre-and-post-increment)
- **Check if a point lies inside a triangle :** [YouTube](https://www.youtube.com/watch?v=qObJQesvZUU)
---
#### **CPP Module 03**
- **Herança simples** e boas práticas.
- **Objetivo**: Desenvolver um modelo com herança e encapsulamento.
Module 03 - Inheritance
- [ex00 - Class implementation](./CPP03ex00/)
- [ex01 - Inheritance, Constructors/Destructors Chaining, Overriding Member Functions](./CPP03/ex01/)
- [ex02 - Inheritance, Constructors/Destructors Chaining, Overriding Member Functions](./CPP03ex02/)
### Resources
- **Inheritance And Polymorphism:** [YouTube](https://www.youtube.com/watch?v=wrkkAOMp3Sw)
- **C++ What is class inheritance?:** [YouTube](https://www.youtube.com/watch?v=ptwZfAhI-kk)
- **Multiple Inheritance in C++:** [geeksforgeeks](https://www.geeksforgeeks.org/multiple-inheritance-in-c/)
- **Multiple Inheritance // Giving your classes multiple parents:** [YouTube](https://www.youtube.com/watch?v=JSBtx_f3WqM)
- **Multiple Inheritance Deep Dive:** [YouTube](https://www.youtube.com/watch?v=sswTE0u0r7g)
- **Hybrid Inheritance in C++ with Diamond Problem:** [YouTube](https://www.youtube.com/watch?v=DiUXoiOLZY0)
---
#### **CPP Module 04**
- **Polimorfismo** e **classes abstratas**.
- **Objetivo**: Explorar conceitos avançados de hierarquia.
Module 04 - Subtype polymorphism, abstract classes, interfaces
- [ex00 - Polymorphism, Inheritance, Virtual Functions](./CPP04/ex00/)
- [ex01 - Memory Management, Deep Copy](./CPP04/ex01/)
- [ex02 - Abstract Classes](./CPP04/ex02/)
### Resources
- **Polymorphism in C++ | Compile time vs Run time Polymorphism:** [YouTube](https://www.youtube.com/watch?v=uc_Hr10cBBE)
- **C++ Subtype Polymorphism and Virtual Functions:** [YouTube](https://www.youtube.com/watch?v=avq_ITaqD-k)
- **Virtual Functions & Abstract Classes in C++:** [YouTube](https://www.youtube.com/watch?v=JU8DbwBvOWE)
- **Abstract Classes And Pure Virtual Functions:** [YouTube](https://www.youtube.com/watch?v=wE0_F4LpGVc)
- **Declare abstract class in c++:** [stackoverflow](https://stackoverflow.com/questions/43502488/declare-abstract-class-in-c)
- **C++ Programming/Classes/Abstract Classes/Pure Abstract Classes:** [Wikibooks](https://en.wikibooks.org/wiki/C++_Programming/Classes/Abstract_Classes/Pure_Abstract_Classes)
- **What is the difference between abstract class and pure abstract class in C++?:** [stackoverflow](https://stackoverflow.com/questions/15253642/what-is-the-difference-between-abstract-class-and-pure-abstract-class-in-c)
- **Interfaces in C++ (Pure Virtual Functions:** [YouTube](https://www.youtube.com/watch?v=UWAdd13EfM8)
- **Interfaces in C++ (Pure virtual functions):** [YouTube](https://www.youtube.com/watch?v=8USgOF7x0hM)
- **C++ Programming: Abstract and Interface Classes:** [YouTube](https://www.youtube.com/watch?v=GumbgtSUMMo)
- **Abstract Class vs Pure Abstract Class | Interface | OOP C++:** [YouTube](https://www.youtube.com/watch?v=BkrISFxSn-4)
- **What are Forward declarations in C++:** [geeksforgeeks](https://www.geeksforgeeks.org/what-are-forward-declarations-in-c/)
- **What are forward declarations in C++?:** [stackoverflow](https://stackoverflow.com/questions/4757565/what-are-forward-declarations-in-c)
- **C++ : How to copy / clone a STL List or Sub List:** [thispointer](https://thispointer.com/c-how-to-copy-clone-a-stl-list-or-sub-list/)
---
#### **CPP Module 05**
- **Exceções em C++**.
- **Objetivo**: Lidar com erros e exceções de forma robusta.
---
#### **CPP Modules 06 e 07**
- **Templates**: funções e classes genéricas.
- **Objetivo**: Resolver problemas que requerem flexibilidade.
---
#### **CPP Module 08**
Trabalho com **containers da STL**.
- **Objetivo**: Aprender a usar `vector`, `map`, `deque`, etc.
---
#### **CPP Module 09**
- **Programação avançada** com STL e algoritmos.
- **Objetivo**: Resolver problemas complexos de eficiência e ordenação.