Skip to content

Abdellahsyani/cpp_projects

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

304 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

C++ Projects - Object-Oriented Programming Journey

Welcome to my C++ learning repository! This project is dedicated to mastering Object-Oriented Programming (OOP) concepts using C++.

📚 About

This repository contains a series of C++ modules (CPP00 through CPP05) that progressively explore fundamental and advanced OOP concepts. Each module includes multiple exercises designed to build a solid foundation in C++ programming.

🗂️ Repository Structure

cpp_projects/
├── CPP00/          # Module 00 - Introduction to C++
│   ├── ex00/
│   ├── ex01/
│   └── ex02/
├── CPP01/          # Module 01 - Memory allocation, references, pointers
├── CPP02/          # Module 02 - Ad-hoc polymorphism, operators overloading
├── CPP03/          # Module 03 - Inheritance
├── CPP04/          # Module 04 - Subtype polymorphism, abstract classes, interfaces
└── CPP05/          # Module 05 - Repetition and exceptions

🎯 Learning Objectives

Throughout these modules, I'm learning and practicing:

  • Basic C++ Syntax: Understanding fundamental C++ constructs
  • Classes and Objects: Implementing OOP principles
  • Memory Management: Working with dynamic memory allocation
  • References and Pointers: Understanding memory addressing
  • Operator Overloading: Customizing operators for classes
  • Inheritance: Creating hierarchical class structures
  • Polymorphism: Both compile-time and runtime polymorphism
  • Abstract Classes and Interfaces: Designing flexible architectures
  • Exception Handling: Writing robust error-handling code

🛠️ Technologies

  • Language: C++ (96.9%)
  • Build System: Makefile (3.1%)
  • Compiler: C++ compiler with C++98 standard (or higher)

🚀 Getting Started

Prerequisites

  • C++ compiler (g++, clang++, etc.)
  • Make utility

Building and Running

Each module contains exercises with their own Makefiles. To compile and run an exercise:

# Navigate to the desired module and exercise
cd CPP00/ex00

# Build the project
make

# Run the executable
./[executable_name]

# Clean build files
make clean    # Remove object files
make fclean   # Remove object files and executable
make re       # Rebuild from scratch

📖 Module Overview

CPP00 - Introduction to C++

Introduction to the fundamentals of C++, including namespaces, classes, member functions, stdio streams, initialization lists, static and const keywords. This module covers the basic building blocks needed to write C++ programs and introduces object-oriented programming concepts.

📚 Resources

CPP01 - Memory Allocation

Deep dive into dynamic memory allocation, pointers to members, references, and understanding the difference between stack and heap memory. Learn about memory leaks, proper resource management, and the importance of destructors in C++.

📚 Resources

CPP02 - Ad-hoc Polymorphism

Understanding operator overloading, fixed-point numbers, and the orthodox canonical class form (Coplien form). This module teaches how to make custom types behave like built-in types and properly manage copy semantics.

📚 Resources

CPP03 - Inheritance

Exploring inheritance hierarchies, access specifiers, and understanding the diamond problem in multiple inheritance. Learn how to create class hierarchies and understand the relationship between base and derived classes.

📚 Resources

CPP04 - Subtype Polymorphism

Working with abstract classes, interfaces, pure virtual functions, and runtime polymorphism through virtual functions. Understanding how to design flexible and extensible class hierarchies using polymorphic behavior.

📚 Resources

CPP05 - Exceptions

Mastering exception handling, understanding stack unwinding, and learning how to write robust error-handling code. This module also reinforces concepts from previous modules through repetition and practical application.

📚 Resources

📝 Notes

  • All code follows C++98 standard (unless specified otherwise)
  • Each exercise builds upon concepts from previous modules
  • Makefiles include flags for strict compilation (-Wall -Wextra -Werror)

👨‍💻 Author

Abdellahsyani

📄 License

This project is created for educational purposes.

🤝 Contributing

This is a personal learning repository, but feel free to open issues if you spot any problems or have suggestions!


Happy Coding! 🚀

About

This repo is about learning oop by using cpp language

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors