WELCOME
C++ Programming Lecture Notes
Welcome to C++ Programming Lecture Notes
This is a complete, premium, editorial-style learning resource covering the C++ programming language from standard loops and references to advanced OOP, templates, standard collections (STL), and modern move semantics. Use the sidebar menu to select a lesson or start typing in the search bar above.
Foundations
- Introduction to C++
- C++ Syntax and Program Structure
- C++ Input and Output
- Variables and Data Types in C++
- Operators in C++
- Control Flow in C++
- Preprocessor Directives & Namespaces in C++
Working With Data
Functions
- Function Basics in C++
- Function Parameters in C++
- Function Overloading in C++
- Recursion in C++
- Inline Functions and Lambda Expressions in C++
Pointers Memory
OOP: INTRODUCTION
OOP: CLASSES AND OBJECTS
OOP: CONSTRUCTORS AND DESTRUCTORS
OOP: ACCESS SPECIFIERS
- `private` Access Specifier
- `public` Access Specifier
- `protected` Access Specifier
- Default Access in `class` and `struct`
- Getter and Setter Functions
- Friend Functions
- Friend Classes
- `this` Pointer
OOP: ENCAPSULATION
OOP: OPERATOR OVERLOADING
- What is Operator Overloading?
- Rules for Operator Overloading
- Overloading Unary Operators
- Overloading Binary Operators
- Overloading Stream Operators
- Operators That Cannot Be Overloaded
OOP: INHERITANCE
- What is Inheritance?
- Constructor and Destructor in Inheritance
- Inheritance and Access Specifiers
- Method Overriding
- Friend Function and Friend Class in Inheritance
OOP: POLYMORPHISM
- What is Polymorphism?
- Function Overloading: Compile-time Polymorphism
- Operator Overloading: Compile-time Polymorphism
- Virtual Functions
- Pure Virtual Functions
- Abstract Classes
- Virtual Destructor
- Dynamic Binding
OOP: ABSTRACTION
OOP: COMPOSITION AND RELATIONSHIPS
OOP: ADVANCED OOP TOPICS
- Smart Pointers: unique_ptr and shared_ptr
- Static Members
- const Members and Functions
- mutable Keyword
- Inline Functions
- Nested Classes
- Local Classes
- Arrays of Objects
- Objects as Function Arguments
- Returning Objects from Functions
OOP: APPENDIX
- OOP Interview Questions (C++)
- Frequently Asked Questions
- Summary
- Further Reading and Resources
- OOP Viva Tricky Questions and Answers
OOP: DESIGN PATTERNS
- Factory Pattern
- Strategy Pattern
- Observer Pattern
- Adapter Pattern
- Command Pattern
- Singleton: When Not To Use It
- Chapter 16 Mega Enhancement Roadmap
OOP: RAII AND OWNERSHIP
- RAII
- Rule of Zero
- Rule of Three and Five
- `unique_ptr`
- `shared_ptr` and `weak_ptr`
- Resource-Managing Classes