{"id":25852572,"url":"https://github.com/f-corvaro/cpp","last_synced_at":"2025-07-01T22:04:24.578Z","repository":{"id":250581718,"uuid":"834740255","full_name":"f-corvaro/CPP","owner":"f-corvaro","description":"\"Master the essentials of C++ programming and project development.\"","archived":false,"fork":false,"pushed_at":"2025-04-10T09:04:26.000Z","size":5269,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-10T10:42:35.071Z","etag":null,"topics":["42","42school","cpp","cpp-modules","cpp98","cpp98-compatible","cppmodules","encapsulation","inheritance","namespaces","object-oriented-programming","orthodox-canonical-class","polymorphism","stl","upper-camel-case","virtual-functions"],"latest_commit_sha":null,"homepage":"https://github.com/f-corvaro","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/f-corvaro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"f-corvaro","ko_fi":"fcorvaro"}},"created_at":"2024-07-28T08:03:43.000Z","updated_at":"2025-04-10T09:04:29.000Z","dependencies_parsed_at":"2025-04-10T10:23:51.554Z","dependency_job_id":"b66507ee-9a21-46ae-895a-b484baf50656","html_url":"https://github.com/f-corvaro/CPP","commit_stats":null,"previous_names":["f-corvaro/cpp"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/f-corvaro/CPP","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f-corvaro%2FCPP","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f-corvaro%2FCPP/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f-corvaro%2FCPP/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f-corvaro%2FCPP/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/f-corvaro","download_url":"https://codeload.github.com/f-corvaro/CPP/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f-corvaro%2FCPP/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263041898,"owners_count":23404457,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["42","42school","cpp","cpp-modules","cpp98","cpp98-compatible","cppmodules","encapsulation","inheritance","namespaces","object-oriented-programming","orthodox-canonical-class","polymorphism","stl","upper-camel-case","virtual-functions"],"created_at":"2025-03-01T14:20:10.423Z","updated_at":"2025-07-01T22:04:24.527Z","avatar_url":"https://github.com/f-corvaro.png","language":"C++","readme":"\u003ch1 align=\"center\"\u003e\u003ca href=\"https://github.com/f-corvaro/CPP\"\u003e\n\t\u003cimg src=\"https://github.com/f-corvaro/CPP/blob/main/.extra/cpp.png\" alt=\"CPP\"\u003e\n  \u003c/a\u003e\u003c/h1\u003e\n  \n\u003cp align=\"center\"\u003e\n\t\u003cb\u003e\u003ci\u003e\"Master the essentials of C++ programming and project development.\"\u003c/i\u003e\u003c/b\u003e\u003cbr\u003e\n\u003c/p\u003e\n\u003cp align=\"center\" style=\"text-decoration: none;\"\u003e\n    \u003ca href=\"https://github.com/f-corvaro/CPP\"\u003e\u003cimg alt=\"GitHub code size in bytes\" src=\"https://img.shields.io/github/languages/code-size/f-corvaro/CPP?color=blueviolet\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/f-corvaro/CPP\"\u003e\u003cimg alt=\"Code language count\" src=\"https://img.shields.io/github/languages/count/f-corvaro/CPP?color=yellow\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/f-corvaro/CPP\"\u003e\u003cimg alt=\"GitHub top language\" src=\"https://img.shields.io/github/languages/top/f-corvaro/CPP?color=blueviolet\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/f-corvaro/CPP\"\u003e\u003cimg alt=\"GitHub last commit\" src=\"https://img.shields.io/github/last-commit/f-corvaro/CPP?color=yellow\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003ch3 align=\"center\"\u003eIndex\u003c/h3\u003e\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"#introduction\"\u003eIntroduction\u003c/a\u003e\u003cbr\u003e\n    \u003ca href=\"#important-guidelines\"\u003eImportant Guidelines\u003c/a\u003e\u003cbr\u003e\n    \u003ca href=\"#compiling\"\u003eCompiling\u003c/a\u003e\u003cbr\u003e\n    \u003ca href=\"#formatting-and-naming-conventions\"\u003eFormatting and Naming Conventions\u003c/a\u003e\u003cbr\u003e\n    \u003ca href=\"#allowedforbidden\"\u003eAllowed/Forbidden\u003c/a\u003e\u003cbr\u003e\n    \u003ca href=\"#design-requirements\"\u003eDesign Requirements\u003c/a\u003e\u003cbr\u003e\n    \u003ca href=\"#additional-notes\"\u003eAdditional Notes\u003c/a\u003e\u003cbr\u003e\n    \u003ca href=\"#overview\"\u003eOverview\u003c/a\u003e\u003cbr\u003e\n    \u003ca href=\"#developed-skills\"\u003eDeveloped Skills\u003c/a\u003e\u003cbr\u003e\n    \u003ca href=\"#support-and-contributions\"\u003eSupport and Contributions\u003c/a\u003e\u003cbr\u003e\n    \u003ca href=\"#author\"\u003eAuthor\u003c/a\u003e\u003cbr\u003e\n\u003c/p\u003e\n\u003cbr\u003e\n\n## Introduction\n\n\u003cp align=\"justify\"\u003e\n\nIn this repository, you will find a collection of projects that cover various aspects of C++ programming. Each project is designed to help you master different concepts and techniques in C++ development. Whether you are a beginner or an experienced programmer, these projects will provide you with valuable hands-on experience and enhance your skills.\n\nFeel free to explore the projects and dive into the world of C++ programming. Happy coding!\n\n\u003c/p\u003e\n\u003cbr\u003e\n\n## Important Guidelines\n\n\u003cp align=\"justify\"\u003e\n\n### Compiling\n\n- Compile your code with `c++` and the flags `-Wall -Wextra -Werror`.\n- Your code should still compile if you add the flag `-std=c++98`.\n  \n### Formatting and Naming Conventions\n- The exercise directories will be named as follows: `ex00`, `ex01`, ..., `exn`.\n- Name your files, classes, functions, member functions, and attributes as specified in the guidelines.\n- Write class names in **UpperCamelCase format**. Files containing class code should be named according to the class name. For example:\n  - ClassName.hpp/ClassName.h\n  - ClassName.cpp\n  - ClassName.tpp\n  - If you have a header file containing the definition of a class \"BrickWall\" representing a brick wall, its name should be `BrickWall.hpp`. \n- Unless specified otherwise, every output message must end with a newline character and be displayed to the standard output.\n- No specific coding style is enforced in the C++ modules. You can follow your preferred style, but ensure your code is clean and readable for peer evaluators.\n\n### Allowed/Forbidden\n\n- You are not coding in C anymore; it's time for C++! Therefore:\n  - You are allowed to use almost everything from the standard library. Use the C++-specific versions of the C functions you are familiar with.\n  - External libraries, including C++11 (and derived forms) and Boost libraries, are forbidden. The following functions are also forbidden: `*printf()`, `*alloc()`, and `free()`. Using them will result in a grade of 0.\n  - Unless explicitly stated otherwise, the `using namespace \u003cns_name\u003e` and `friend` keywords are forbidden. Violating this rule will result in a grade of -42. **CORRECT USAGE** \n    ```cpp\n        std::cout \u003c\u003c \"Hello, World!\" \u003c\u003c std::endl; // Correct: using std:: prefix\n        using namespace std; // Incorrect: using namespace directive\n        cout \u003c\u003c \"Hello, World!\" \u003c\u003c endl; // Incorrect: no std:: prefix\n    ```\n  - The STL is allowed only in Modules 08 and 09. This means no Containers (vector/list/map/etc.) and no Algorithms (anything requiring the `\u003calgorithm\u003e` header) until then. Violating this rule will result in a grade of -42.\n\n### Design Requirements\n- Avoid memory leaks when allocating memory using the `new` keyword.\n- From Module 02 to Module 09, your classes must follow the `Orthodox Canonical Form` unless explicitly stated otherwise.\n    The **Orthodox Canonical Form (OCF)** is a set of four special member functions that every class should implement to ensure proper resource management and copying behavior. These functions are:\n\n    1. **Default Constructor**: A constructor that can be called with no arguments.\n    2. **Destructor**: A function that is called when an object is destroyed to release resources.\n    3. **Copy Constructor**: A constructor that creates a new object as a copy of an existing object.\n    4. **Copy Assignment Operator**: An operator that assigns the values from one object to another existing object.\n\n    #### Example of Orthodox Canonical Form\n\n    ```cpp\n    class MyClass \n    {\n    public:\n        MyClass(); // Default Constructor\n        ~MyClass(); // Destructor\n        MyClass(const MyClass\u0026 other); // Copy Constructor\n        MyClass\u0026 operator=(const MyClass\u0026 other); // Copy Assignment Operator\n    private:\n        int* data;\n    };\n    ```\n- Implementing functions in a header file (except for function templates) will result in a grade of 0 for the exercise.\n- Each header should be usable independently from others. Include all necessary dependencies and use include guards to prevent double inclusion. Failure to do so will result in a grade of 0.\n\n### Additional Notes\n- You can add additional files if needed to split your code. As these assignments are not verified by a program, feel free to do so as long as you submit the mandatory files.\n- Sometimes, the guidelines of an exercise may seem short, but the examples can show requirements not explicitly written in the instructions.\n- Read each module completely before starting! Really, do it.\n  \n\u003cp\u003e\n\u003cbr\u003e\n\n## Overview\n\n\u003cp align=\"justify\"\u003e\n\nDuring the development of these projects, you will study the following main concepts:\n\n### 0. [CPP00](https://github.com/f-corvaro/CPP/tree/main/CPP00) (C++ - single project): Basics, Classes, Objects\n\n- **Introduction to C++**: Overview of the language and its features.\n- **Basic Syntax and Data Types**: Understanding variables, data types, and basic syntax.\n- **Control Structures**: Using `if`, `else`, `switch`, loops (`for`, `while`, `do-while`).\n- **Functions**: Defining and calling functions, passing arguments, and return values.\n- **Namespaces**: Understanding and using namespaces to avoid naming conflicts.\n- **Classes and Objects**: Introduction to object-oriented programming, defining classes, and creating objects.\n- **Member Functions**: Implementing and using member functions within classes.\n- **I/O Streams**: Using `cin`, `cout`, and file streams for input and output operations.\n- **Initialization Lists**: Using initialization lists in constructors for efficient member initialization.\n- **Static and Const Keywords**: Understanding the use of `static` and `const` for variables, functions, and class members.\n\n  [![fcorvaro's 42 CPP00 Score](https://github.com/f-corvaro/42.common_core/blob/main/.extra/100.png)](https://profile.intra.42.fr/users/fcorvaro)\n\n  ```Evaluation Length = 15/30 Mins``` | ```2 Peers```\n\n### 1. [CPP01](https://github.com/f-corvaro/CPP/tree/main/CPP01) (C++ - single project): Memory Allocation, References, Pointers\n\n- **Memory Allocation**: Understanding dynamic memory allocation and deallocation using `new` and `delete`.\n- **Heap and Stack Allocation**: Differentiating between memory allocated on the heap and the stack.\n- **Copy Constructor**: Creating a new object as a copy of an existing object.\n- **Copy Assignment Operator**: Assigning the values from one object to another existing object.\n- **Destructor**: Cleaning up resources when an object is destroyed.\n- **Function Overloading**: Defining multiple functions with the same name but different parameter lists.\n- **Operator Overloading**: Customizing the behavior of operators for user-defined types.\n\n  [![fcorvaro's 42 CPP01 Score](https://github.com/f-corvaro/42.common_core/blob/main/.extra/100.png)](https://profile.intra.42.fr/users/fcorvaro)\n\n  ```Evaluation Length = 15/30 Mins``` | ```2 Peers```\n\n### 2. [CPP02](https://github.com/f-corvaro/CPP/tree/main/CPP02) (C++ - single project): Ad-hoc Polymorphism, Operator Overloading\n\n- **Ad-hoc Polymorphism**: Using function overloading and operator overloading to achieve polymorphic behavior.\n- **Operator Overloading**: Customizing the behavior of operators for user-defined types.\n- **Inheritance**: Establishing a hierarchy between classes and reusing code from base classes.\n- **Virtual Functions**: Enabling dynamic polymorphism by overriding base class methods in derived classes.\n- **Abstract Classes**: Defining classes that cannot be instantiated and serve as blueprints for derived classes.\n\n  [![fcorvaro's 42 CPP02 Score](https://github.com/f-corvaro/42.common_core/blob/main/.extra/100.png)](https://profile.intra.42.fr/users/fcorvaro)\n\n  ```Evaluation Length = 15/30 Mins``` | ```2 Peers```\n\n### 3. [CPP03](https://github.com/f-corvaro/CPP/tree/main/CPP03) (C++ - single project): Inheritance\n\n- **Inheritance**: Establishing a hierarchy between classes and reusing code from base classes.\n- **Polymorphism**: Using base class pointers or references to interact with derived class objects.\n- **Encapsulation**: Restricting access to certain class members to ensure controlled interaction.\n- **Abstraction**: Hiding implementation details and exposing only essential features.\n- **Construction and Destruction Order**: Understanding the order in which constructors and destructors are called in inheritance hierarchies.\n\n  [![fcorvaro's 42 CPP03 Score](https://github.com/f-corvaro/42.common_core/blob/main/.extra/100.png)](https://profile.intra.42.fr/users/fcorvaro)\n\n  ```Evaluation Length = 15/30 Mins``` | ```2 Peers```\n\n### 4. [CPP04](https://github.com/f-corvaro/CPP/tree/main/CPP04) (C++ - single project): Subtype Polymorphism, Abstract Classes, Interfaces\n\n- **Subtype Polymorphism**: Using base class pointers or references to achieve runtime polymorphism.\n- **Interfaces**: Defining abstract classes with pure virtual functions to enforce a contract for derived classes.\n- **Abstract Classes**: Creating classes that cannot be instantiated and serve as blueprints for derived classes.\n- **Multiple Inheritance**: Combining behaviors and properties from multiple base classes.\n- **Diamond Problem**: Resolving ambiguity in multiple inheritance using virtual inheritance.\n\n  [![fcorvaro's 42 CPP04 Score](https://github.com/f-corvaro/42.common_core/blob/main/.extra/100.png)](https://profile.intra.42.fr/users/fcorvaro)\n\n  ```Evaluation Length = 15/30 Mins``` | ```2 Peers``` \n\n### 5. [CPP05](https://github.com/f-corvaro/CPP/tree/main/CPP05) (C++ - single project): Repetition, Exceptions\n\n - **Exception Handling**: Understanding and implementing exception handling mechanisms in C++ using `try`, `catch`, and `throw`.\n- **Custom Exceptions**: Creating and using custom exception classes to handle specific error scenarios.\n- **RAII (Resource Acquisition Is Initialization)**: Managing resources effectively to ensure proper cleanup in the presence of exceptions.\n\n  [![fcorvaro's 42 CPP05 Score](https://github.com/f-corvaro/42.common_core/blob/main/.extra/100.png)](https://profile.intra.42.fr/users/fcorvaro)\n\n  ```Evaluation Length = 15/30 Mins``` | ```2 Peers```\n\n### 6. [CPP06](https://github.com/f-corvaro/CPP/tree/main/CPP06) (C++ - single project): C++ Casts\n\n  - Type Casting\n  - Static Cast\n  - Dynamic Cast\n  - Const Cast\n  - Reinterpret Cast\n\n  **Status:** Coming Soon\n\n  ```Evaluation Length = 15/30 Mins``` | ```2 Peers```\n\n### 7. [CPP07](https://github.com/f-corvaro/CPP/tree/main/CPP07) (C++ - single project): Templates\n\n  - Function Templates\n  - Class Templates\n  - Template Specialization\n  - Variadic Templates\n\n  **Status:** Coming Soon\n\n  ```Evaluation Length = 15/30 Mins``` | ```2 Peers```\n\n### 8. [CPP08](https://github.com/f-corvaro/CPP/tree/main/CPP08) (C++ - single project): Templated Containers, Iterators, Algorithms\n\n  - STL (Standard Template Library)\n  - Containers\n  - Iterators\n  - Algorithms\n  - Functors\n\n  **Status:** Coming Soon\n\n  ```Evaluation Length = 15/30 Mins``` | ```2 Peers```\n\n### 9. [CPP09](https://github.com/f-corvaro/CPP/tree/main/CPP09) (C++ - single project): C++98, C++03\n\n  - Smart Pointers\n  - Unique Pointer\n  - Shared Pointer\n  - Weak Pointer\n  - Custom Deleters\n\n  **Status:** Coming Soon\n\n  ```Evaluation Length = 15/30 Mins``` | ```2 Peers```\n\n\u003c/p\u003e\n\n## Developed Skills\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://skillicons.dev\"\u003e\n    \u003cimg src=\"https://skillicons.dev/icons?i=git,cpp,vscode,vim\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\u003cbr\u003e\n\n## Support and Contributions\n\n\u003cp align=\"center\"\u003e\nIf you find this repository helpful, please consider starring it to show your support. Your support is greatly appreciated!\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://ko-fi.com/fcorvaro\"\u003e\u003cimg width=\"180\" img align=\"center\" src=\"https://github.com/f-corvaro/42.common_core/blob/main/.extra/support-me-ko-fi.svg\"\u003e\u003calt=\"\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/sponsors/f-corvaro\"\u003e\u003cimg width=\"180\" img align=\"center\" src=\"https://github.com/f-corvaro/42.common_core/blob/main/.extra/support-me-github.svg\"\u003e\u003calt=\"\"\u003e\u003c/a\u003e\n\n\u003cbr\u003e\n\n## Author\n\n\u003cp align=\"center\"\u003e\u003ca href=\"https://profile.intra.42.fr/users/fcorvaro\"\u003e\u003cimg style=\"height:auto;\" src=\"https://avatars.githubusercontent.com/u/102758065?v=4\" width=\"100\" height=\"100\"alt=\"\"\u003e\u003c/a\u003e\n\u003cp align=\"center\"\u003e\n\u003ca href=\"mailto:fcorvaro@student.42roma.it\"\u003e\u003ckbd\u003eEmail\u003c/kbd\u003e\u003calt=\"\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/f-corvaro\"\u003e\u003ckbd\u003eGithub\u003c/kbd\u003e\u003calt=\"\"\u003e\u003c/a\u003e\n\u003ca href=\"https://www.linkedin.com/in/f-corvaro/\"\u003e\u003ckbd\u003eLinkedin\u003c/kbd\u003e\u003calt=\"\"\u003e\u003c/a\u003e\n\u003ca href=\"https://42born2code.slack.com/team/U050L8XAFLK\"\u003e\u003ckbd\u003eSlack\u003c/kbd\u003e\u003calt=\"\"\u003e\u003c/a\u003e\n\n\u003chr/\u003e","funding_links":["https://github.com/sponsors/f-corvaro","https://ko-fi.com/fcorvaro"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ff-corvaro%2Fcpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ff-corvaro%2Fcpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ff-corvaro%2Fcpp/lists"}