Skip to content

ManishKrBarman/playground-cpp

Repository files navigation

C++ Playground

This repository is a structured playground to practice and explore various C++ concepts, patterns, and problem-solving techniques.

📚 Topics Covered

🔰 Fundamentals

  • C++ Workflow — Compilation process from source to executable (00_workflow/)
  • Basic I/O Operations — Hello World with iostream (01_hello/)
  • Variables & Data Types — Introduction to variables (02_variables/)
  • Functions — Function declaration, definition, and parameters (03_functions/)
  • Header Files — Code organization and modular programming (04_header_files/)

🎯 Control Structures

  • Conditions & Branches — If-else, ternary, switch statements (05_conditions_branches/)
  • Loops — For, while, do-while, range-based loops (06_loops/)
  • Control Flow — Break, continue, return, exception handling (07_control_flow/)

🧠 Memory & Data

  • Pointers — Memory addresses, dynamic allocation, pointer arithmetic (08_pointers/)
  • References — Aliasing, pass-by-reference, const references (09_references/)

🏗️ Object-Oriented Programming

  • Classes — Object-oriented programming, member functions, access control (10_classes/)
  • Structs — Data structures, member functions, initialization (11_structs/)
  • Static — Static variables, static functions, storage classes (12_static/)
  • Enums — Traditional and scoped enums, type safety (13_enum/)
  • Constructors — Default, parameterized, copy, move constructors (14_constructor/)
  • Destructors — Resource cleanup, RAII pattern, virtual destructors (15_destructor/)

🎭 Advanced OOP Concepts

  • Inheritance — Class hierarchies, polymorphism, multiple inheritance (16_inheritance/)

  • Virtual Functions — Runtime polymorphism, vtables, pure virtual functions (17_virtual_functions/)

  • Interfaces — Abstract classes, design patterns, SOLID principles (18_interfaces/)

  • Visibility — Access control, encapsulation, friend functions (19_visibility/)

  • 🔄 More topics coming soon

💡 Purpose

  • 🎯 Solidifying foundational C++ concepts
  • 🧠 Practicing problem-solving and clean code
  • 📝 Building ready-to-copy snippets for future use
  • 📖 Creating a professional reference for future projects

📁 Folder Structure

🗂️ playground-cpp/
├── 📂 00_workflow/       # C++ compilation workflow & process
│   ├── main.cpp          # Basic Hello World source code
│   └── notes.md          # Detailed workflow documentation
├── 📂 01_hello/          # Basic Hello World program
│   ├── hello.cpp         # Source code
│   └── notes.md          # Program analysis & explanation
├── ...
│
├── 📄 env.md             # Development environment setup guide
└── 📄 README.md          # Project overview and structure

⚙️ Compile & Run a C++ File

g++ file.cpp -o output.exe    # Compiles and creates output.exe

output.exe                    # Executes the program (Windows)

📝 Example with a project:

cd 00_workflow
g++ main.cpp -o main.exe
main.exe

📚 Resources


📌 Notes:

  • Each project folder contains detailed notes explaining concepts and implementation
  • Check env.md for complete development environment setup instructions
  • Use the provided compilation commands to build and run each project

🌟 thanks for visiting 🌟

About

A structured C++ playground for mastering concepts, solving problems, and experimenting with real code.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors