C++ Programs and Examples

This repository contains various C++ programs that demonstrate different concepts, including object-oriented programming, control structures, functions, templates, exception handling, file handling, and more. Each program is placed in the src directory and covers a specific topic or example.

Refer to this youtube video.

Prerequisites

  • C++ Compiler: Make sure you have a C++ compiler installed, such as g++ for Linux/macOS or MSVC for Windows.
  • CMake: Install CMake (version 3.10 or higher) to configure and generate the build files.

C++ Topics Covered

This project includes code that covers a variety of C++ concepts:

  • Arrays: Array operations, multi-dimensional arrays (array2.cpp, MultiVariableArray.cpp)
  • Functions: Overloading, templates, and recursion (FuncitonOverloading.cpp, functiontemplate2.cpp, Recursion.cpp)
  • Control Structures: Loops (dowhileloop.cpp, forloop.cpp, whileloop.cpp), conditionals (if_else.cpp, switchstatement.cpp)
  • Object-Oriented Programming (OOP): Classes, objects, constructors, destructors, inheritance, polymorphism, operator overloading, and templates (classandobjects.cpp, Polymorphism.cpp, inheretance.cpp, OperatorOverloading.cpp)
  • Exception Handling: Multiple examples of handling exceptions (ExceptionHandling.cpp, ExceptionHandling2.cpp)
  • File Handling: Working with files, reading and writing data (FileProgram.cpp, Files.cpp)
  • Templates: Function and class templates (FunctionTemplate.cpp, ClassTemplates.cpp)
  • Miscellaneous: Random number generation, pointers, recursion, and more.

License

This project is licensed under the MIT License.