Skip to content

A C++ code repository sharing solved exercises to support peer learning, discussion, and collaboration.

License

Notifications You must be signed in to change notification settings

arshiumair/class-projects

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Practice CPP projects of the class

C++ Concepts & Examples Repository

This repository contains a curated collection of C++ programs and examples designed to help university students understand and master core C++ programming concepts. Each file demonstrates a specific topic, making it easier for peers to learn through practical, real-world code.


Programming Concepts Covered

  • Basic Syntax & Data Types
  • Loops & Control Structures
  • Arrays & Strings
  • Functions & Function Overloading
  • Object-Oriented Programming (OOP)
    • Classes & Objects
    • Constructors & Destructors
    • Inheritance
    • Polymorphism
    • Abstract Classes & Virtual Functions
  • Operator Overloading
  • Structures
  • File Handling

Usage

To compile and run any example:

  1. Open a terminal in the repository folder.
  2. Use a C++ compiler (e.g., g++, clang++, or MSVC) to compile the desired file:
    g++ filename.cpp -o output.exe
    ./output.exe
  3. Replace filename.cpp with the file you want to run.

Technologies Used

  • C++ (Standard C++17/20)
  • Compilers: GCC, Clang, MSVC
  • Platform: Windows, Linux, macOS

Contributing

Contributions are welcome! Peer students are encouraged to:

  • Add new example programs covering additional concepts
  • Improve code clarity or add comments
  • Fix bugs or suggest enhancements

To contribute, fork the repository, create a branch, and submit a pull request with your changes.


File Descriptions

File/Filename Description
Abstract-class.cpp Demonstrates abstract classes and pure virtuals
add-func_overload.cpp Function overloading example
Add-Sub_distance-constructor.cpp Constructor usage with distance structures
Add-Sub_time_constructor.cpp Constructor usage with time structures
Adding_two_dates_STRs.cpp Adding two date structures
adding-distnce-structures.cpp Structure operations: addition (distance)
adding-time-structures.cpp Structure operations: addition (time)
BinaryOperator_overloading.cpp Binary operator overloading
class-date-RTOBJ.cpp Class example: date, returning objects
classes-return-obj.cpp Classes returning objects from functions
constructor_overload.cpp Constructor overloading
Ex_2-inheritance.cpp Inheritance example
Ex-1_function_overriding.cpp Function overriding example
Ex-1_Inheritance.cpp Basic inheritance
Ex-1_polymorphism.cpp Polymorphism example
Ex-2_function_overriding.cpp Advanced function overriding
Fun_overload.cpp Function overloading
funtion_overriding.cpp Function overriding
return-Tobj.cpp Returning objects from functions
subtracting-date-structures.cpp Subtracting date structures
subtracting-time-structures.cpp Subtracting time structures
subtrcting-distance-structures.cpp Subtracting distance structures
UnaryOperator_overload-.cpp Unary operator overloading
unaryOperator_overload-PF.cpp Unary operator overloading (prefix/postfix)
Virtual_function.cpp Virtual functions and runtime polymorphism

License

This project is licensed under the MIT LICENSE.
I hope this effort will be a helpful favour for you.
Thanks for your cooperation.

Regards:
Author

About

A C++ code repository sharing solved exercises to support peer learning, discussion, and collaboration.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages