C++ Topics
This directory contains detailed notes and explanations for various C++ concepts, organized by category.
Directory Structure
Object-Oriented Programming (oop/)
Focus: OOP principles and C++ implementation
Topics:
- PillarsofOOP.md - The four pillars: Encapsulation, Abstraction, Inheritance, Polymorphism
- classes.md - Complete tutorial on OOP types, inheritance, polymorphism, operators, and exceptions
- Exception.md - Exception handling in C++
Prerequisites: Basic C++ syntax
Related: OOP Tutorial, OOP Problems
C++ Fundamentals (cpp-fundamentals/)
Focus: Core C++ language features and syntax
Topics:
- pointers.md - Pointers, references, and memory addresses
- arguments.md - Function parameters and argument passing
- file.md - File I/O operations
- lambda.md - Lambda expressions and anonymous functions
- templates.md - Function and class templates
Prerequisites: Basic programming concepts
Related: Code Examples
Advanced C++ (advanced/)
Focus: Advanced features and modern C++ practices
Topics:
- stl.md - Standard Template Library (containers, algorithms, iterators)
- ruleofFive.md - Rule of Five (destructor, copy/move constructors, copy/move assignment)
- c++11.md - Move semantics, lvalue/rvalue references, std::move
- smartpointers.md - Smart pointers (unique_ptr, shared_ptr, weak_ptr)
- constexpr.md - Compile-time evaluation with constexpr, consteval, constinit
- auto-decltype.md - Type deduction with auto and decltype
- range-for.md - Range-based for loops and iteration patterns
- variadic-templates.md - Variadic templates and fold expressions
- optional-variant-any.md - std::optional, std::variant, std::any (C++17)
- template-specialization.md - Full and partial template specialization
- scoped-enums.md - enum class and type-safe enumerations
- advanced-cpp20.md - Overview of major C++20 features
- concepts.md - Template constraints with C++20 concepts
- ranges.md - Lazy, composable sequence processing with ranges
- modules.md - Module-based organization in C++20
Prerequisites: Strong understanding of C++ fundamentals
Related: Advanced assignments
Algorithms (algorithms/)
Focus: Algorithm implementation and problem-solving
Topics:
- mergesort.md - Merge sort algorithm and implementation
Prerequisites: Basic data structures knowledge
Related: Practice Problems, Sudoku Solver
Learning Path
Beginner Path
- Start with C++ Fundamentals
- Pointers and references
- Function arguments
- File I/O
- Practice with basic code examples
- Work through beginner problems
Intermediate Path
- Study OOP concepts
- Pillars of OOP
- Exception handling
- Learn Templates and Lambda
- Complete OOP assignments
Advanced Path
- Master STL
- Containers (vector, map, set, etc.)
- Algorithms (sort, find, transform, etc.)
- Iterators
- Understand Rule of Five
- Learn Move Semantics (C++11)
- Learn Smart Pointers
- Explore Modern C++ features
- constexpr and compile-time programming
- auto and decltype
- Range-based for loops
- Variadic templates
- std::optional, std::variant, std::any
- Work on complex assignments
Additional Topics to Study
The following advanced topics are now available:
- Template Specialization - Partial and full template specialization
- Scoped Enums - enum class and type-safe enumerations
- Advanced C++20 Features
- Concepts
- Ranges
- Modules
See COURSE_OUTLINE.md for a complete list of planned topics.
How to Use These Notes
- Read thoroughly: Take your time understanding each concept
- Try examples: Type out and run the code examples
- Modify code: Change examples to see what happens
- Practice: Work on related problems after studying
- Review: Revisit topics as you progress
Study Tips
- Build incrementally: Master basics before moving to advanced topics
- Code daily: Consistent practice is key
- Debug actively: When code breaks, figure out why
- Ask questions: Use office hours and forums
- Teach others: Explaining concepts reinforces learning
Related Materials
- Lectures: lectures/ - Weekly lecture notes
- Slides: slides/ - PowerPoint presentations
- Code Examples: code-examples/ - Practical implementations
- Assignments: assignments/ - Graded projects
- Practice: practice-problems/ - Additional exercises
- Resources: resources/ - Books, cheat sheets, external links
External Learning Resources
- YouTube:
- Books:
- See resources/books/ for recommended texts
- Scott Meyers’ Effective C++ series
- Online:
Remember: Understanding takes time. Don’t rush through topics. Practice, experiment, and ask questions!