Skip to content

Latest commit

 

History

History
271 lines (198 loc) · 11.2 KB

README.md

File metadata and controls

271 lines (198 loc) · 11.2 KB

"Master the essentials of C++ programming and project development."

GitHub code size in bytes Code language count GitHub top language GitHub last commit

Index

Introduction
Important Guidelines
Compiling
Formatting and Naming Conventions
Allowed/Forbidden
Design Requirements
Additional Notes
Overview
Developed Skills
Support and Contributions
Author


Introduction

In 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.

Feel free to explore the projects and dive into the world of C++ programming. Happy coding!


Important Guidelines

Compiling

  • Compile your code with c++ and the flags -Wall -Wextra -Werror.
  • Your code should still compile if you add the flag -std=c++98.

Formatting and Naming Conventions

  • The exercise directories will be named as follows: ex00, ex01, ..., exn.
  • Name your files, classes, functions, member functions, and attributes as specified in the guidelines.
  • Write class names in UpperCamelCase format. Files containing class code should be named according to the class name. For example:
    • ClassName.hpp/ClassName.h
    • ClassName.cpp
    • ClassName.tpp
    • If you have a header file containing the definition of a class "BrickWall" representing a brick wall, its name should be BrickWall.hpp.
  • Unless specified otherwise, every output message must end with a newline character and be displayed to the standard output.
  • 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.

Allowed/Forbidden

  • You are not coding in C anymore; it's time for C++! Therefore:
    • You are allowed to use almost everything from the standard library. Use the C++-specific versions of the C functions you are familiar with.
    • 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.
    • Unless explicitly stated otherwise, the using namespace <ns_name> and friend keywords are forbidden. Violating this rule will result in a grade of -42. CORRECT USAGE
          std::cout << "Hello, World!" << std::endl; // Correct: using std:: prefix
          using namespace std; // Incorrect: using namespace directive
          cout << "Hello, World!" << endl; // Incorrect: no std:: prefix
    • The STL is allowed only in Modules 08 and 09. This means no Containers (vector/list/map/etc.) and no Algorithms (anything requiring the <algorithm> header) until then. Violating this rule will result in a grade of -42.

Design Requirements

  • Avoid memory leaks when allocating memory using the new keyword.

  • From Module 02 to Module 09, your classes must follow the Orthodox Canonical Form unless explicitly stated otherwise. 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:

    1. Default Constructor: A constructor that can be called with no arguments.
    2. Destructor: A function that is called when an object is destroyed to release resources.
    3. Copy Constructor: A constructor that creates a new object as a copy of an existing object.
    4. Copy Assignment Operator: An operator that assigns the values from one object to another existing object.

    Example of Orthodox Canonical Form

    class MyClass 
    {
    public:
        MyClass(); // Default Constructor
        ~MyClass(); // Destructor
        MyClass(const MyClass& other); // Copy Constructor
        MyClass& operator=(const MyClass& other); // Copy Assignment Operator
    private:
        int* data;
    };
  • Implementing functions in a header file (except for function templates) will result in a grade of 0 for the exercise.

  • 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.

Additional Notes

  • 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.
  • Sometimes, the guidelines of an exercise may seem short, but the examples can show requirements not explicitly written in the instructions.
  • Read each module completely before starting! Really, do it.


Overview

During the development of these projects, you will study the following main concepts:

0. CPP00 (C++ - single project): Basics, Classes, Objects

  • Introduction to C++
  • Basic Syntax and Data Types
  • Control Structures
  • Functions
  • Namespaces
  • Classes and Objects
  • Member Functions
  • I/O Streams
  • Initialization Lists
  • Static and Const Keywords

fcorvaro's 42 CPP00 Score

Evaluation Length = 15/30 Mins | 2 Peers

1. CPP01 (C++ - single project): Memory Allocation, References, Pointers

  • Memory Allocation
  • Heap and Stack Allocation
  • Copy Constructor
  • Copy Assignment Operator
  • Destructor
  • Function Overloading
  • Operator Overloading

fcorvaro's 42 CPP01 Score

Evaluation Length = 15/30 Mins | 2 Peers

2. CPP02 (C++ - single project): Ad-hoc Polymorphism, Operator Overloading

  • Ad-hoc Polymorphism
  • Operator Overloading
  • Inheritance
  • Virtual Functions
  • Abstract Classes

fcorvaro's 42 CPP02 Score

Evaluation Length = 15/30 Mins | 2 Peers

3. CPP03 (C++ - single project): Inheritance

  • Inheritance
  • Polymorphism
  • Encapsulation
  • Abstraction
  • Construction and Destruction Order

fcorvaro's 42 CPP03 Score

Evaluation Length = 15/30 Mins | 2 Peers

4. CPP04 (C++ - single project): Subtype Polymorphism, Abstract Classes, Interfaces

  • Subtype Polymorphism
  • Interfaces
  • Abstract Classes
  • Multiple Inheritance
  • Diamond Problem

fcorvaro's 42 CPP04 Score

Evaluation Length = 15/30 Mins | 2 Peers

5. CPP05 (C++ - single project): Repetition, Exceptions

  • Exception Handling
  • Standard Exceptions
  • Custom Exceptions
  • RAII (Resource Acquisition Is Initialization)

Status: Coming Soon

Evaluation Length = 15/30 Mins | 2 Peers

6. CPP06 (C++ - single project): C++ Casts

  • Type Casting
  • Static Cast
  • Dynamic Cast
  • Const Cast
  • Reinterpret Cast

Status: Coming Soon

Evaluation Length = 15/30 Mins | 2 Peers

7. CPP07 (C++ - single project): Templates

  • Function Templates
  • Class Templates
  • Template Specialization
  • Variadic Templates

Status: Coming Soon

Evaluation Length = 15/30 Mins | 2 Peers

8. CPP08 (C++ - single project): Templated Containers, Iterators, Algorithms

  • STL (Standard Template Library)
  • Containers
  • Iterators
  • Algorithms
  • Functors

Status: Coming Soon

Evaluation Length = 15/30 Mins | 2 Peers

9. CPP09 (C++ - single project): C++98, C++03

  • Smart Pointers
  • Unique Pointer
  • Shared Pointer
  • Weak Pointer
  • Custom Deleters

Status: Coming Soon

Evaluation Length = 15/30 Mins | 2 Peers

Developed Skills


Support and Contributions

If you find this repository helpful, please consider starring it to show your support. Your support is greatly appreciated!


Author

Email Github Linkedin Slack