Loading repovive.com/roadmaps/cpp
Roadmaps
C++
Structs
Problemset
Discussion
AI Helper
Getting Started
0/48
1
Intro
2
Where C++ is Used
3
What You Will Learn
4
Using the Online Compiler
5
Your First Program
6
Challenge: Hello World
7
Quiz: First Program
8
Challenge: Print Your Name
9
The #include Line
10
Vocabulary - Header Files
11
Quiz: Understanding #include
12
The using namespace std Line
13
The main Function
14
Quiz: Program entry point
15
Vocabulary - Function
16
The cout Statement
17
The endl Keyword
18
Quiz: Basic Structure
19
The return Statement
20
Semicolons
21
Quiz: Statement termination
22
Curly Braces
23
Quiz: Syntax Elements
24
Comments - Single Line
25
Comments - Multi Line
26
Quiz: Code documentation
27
Why Write Comments
28
Vocabulary - Syntax
29
Vocabulary - Compiler
30
Common Error - Missing Semicolon
31
Common Error - Missing Braces
32
Common Error - Typos in Keywords
33
Reading Error Messages
34
Quiz: Common Errors
35
Code Style - Indentation
36
Code Style - Naming
37
Quiz: Valid identifiers
38
Problem - Print Multiple Lines
39
Problem - Print a Box Pattern
40
Problem - Print Pattern
41
Print Pattern - The Idea
42
Print Pattern - Implementation
43
Lessons from Print Pattern
44
Problem - Hello Name
45
Hello Name - The Idea
46
Hello Name - Implementation
47
Lessons from Hello Name
48
Section Recap
Variables & Data Types
0/57
1
Intro
2
What is a Variable?
3
Vocabulary - Data Types
4
The int Type
5
int Range and Limits
6
Quiz: Integer Basics
7
Overflow - What Happens
8
Quiz: int Type
9
The long long Type
10
When to Use long long
11
Quiz: Large integers
12
The LL Suffix
13
The double Type
14
Floating Point Precision
15
Quiz: Integer type
16
Precision Errors in Practice
17
When to Use double
18
Quiz: Decimal numbers
19
The char Type
20
ASCII Values
21
Character Arithmetic
22
Challenge: Simple Addition
23
Quiz: char Type
24
The bool Type
25
Boolean in Conditions
26
The string Type
27
Basic String Operations
28
Challenge: Rectangle Area
29
Quiz: Text storage
30
Declaring Variables
31
Variable Naming Rules
32
Quiz: Data storage
33
Variable Naming Conventions
34
Initialization vs Declaration
35
Quiz: Data storage
36
Uninitialized Variables
37
Constants with const
38
Why Use Constants
39
Quiz: Data storage
40
Type Conversion - Implicit
41
Type Conversion - Explicit
42
Quiz: Data storage
43
Common Type Mistakes
44
Printing Variables
45
Printing Multiple Values
46
Quiz: Integer type
47
Problem - Calculate Rectangle Area
48
Problem - Convert Celsius to Fahrenheit
49
Problem - Sum of Two
50
Sum of Two - The Idea
51
Sum of Two - Implementation
52
Lessons from Sum of Two
53
Problem - Temperature Convert
54
Temperature Convert - The Idea
55
Temperature Convert - Implementation
56
Lessons from Temperature Convert
57
Section Recap
Input & Output
0/48
1
Intro
2
Reading Input with cin
3
How cin Works
4
Reading int Values
5
Reading double Values
6
Quiz: Reading Input
7
Reading char Values
8
Quiz: Basic Input
9
Reading Multiple Values
10
Reading Multiple Values
11
Input Order Matters
12
Quiz: Multiple Inputs
13
Reading Strings with cin
14
The Whitespace Problem
15
Reading Full Lines with getline
16
Mixing cin and getline
17
Challenge: Temperature Converter
18
Quiz: Reading full lines
19
Fixing the Newline Problem
20
Input Validation Basics
21
When Input Fails
22
Quiz: Knowledge check
23
Checking Input State
24
Formatting Output
25
Setting Precision
26
Quiz: Counter-based loop
27
Fixed vs Scientific
28
Setting Width
29
Quiz: Conditional execution
30
Common Input Patterns
31
Reading Until EOF
32
Reading Until Sentinel
33
Problem - Calculate Average
34
Problem - Echo Input
35
Problem - Watermelon
36
Watermelon - The Idea
37
Watermelon - Algorithm
38
Quiz: Knowledge check
39
Watermelon - Implementation
40
Lessons from Watermelon
41
Problem - Way Too Long Words
42
Way Too Long Words - The Idea
43
Reading Multiple Inputs
44
Quiz: Large integers
45
Way Too Long Words - Algorithm
46
Way Too Long Words - Implementation
47
Lessons from Way Too Long Words
48
Section Recap
Operators & Expressions
0/52
1
Intro
2
What is an Operator?
3
Arithmetic Operators Overview
4
Addition and Subtraction
5
Multiplication
6
Quiz: Basic Operations
7
Division with Integers
8
Division with Doubles
9
Quiz: Integer division
10
The Modulo Operator
11
Modulo Use Cases
12
Quiz: Modulo
13
Operator Precedence
14
Using Parentheses
15
Quiz: Precedence
16
Assignment Operators
17
Challenge: Even or Odd
18
Compound Assignment
19
Increment and Decrement
20
Pre vs Post Increment
21
Quiz: Operator basics
22
Quiz: Assignment
23
Challenge: Maximum of Two
24
Comparison Operators Overview
25
Equal and Not Equal
26
Less Than and Greater Than
27
Less/Greater or Equal
28
Quiz: Operator basics
29
Quiz: Comparison
30
Logical Operators Overview
31
Logical AND
32
Quiz: Logical AND
33
Logical OR
34
Logical NOT
35
Quiz: Logical AND
36
Short-Circuit Evaluation
37
Quiz: Logical Operators
38
Problem - Check Even or Odd
39
Problem - Leap Year Check
40
Problem - Next Round
41
Next Round - The Idea
42
Next Round - Algorithm
43
Quiz: Operator basics
44
Next Round - Implementation
45
Lessons from Next Round
46
Problem - Beautiful Year
47
Beautiful Year - The Idea
48
Beautiful Year - Algorithm
49
Quiz: Conditional execution
50
Beautiful Year - Implementation
51
Lessons from Beautiful Year
52
Section Recap
Control Flow
0/53
1
Intro
2
What is Control Flow?
3
The if Statement
4
Condition Expressions
5
Quiz: if Basics
6
if-else Statement
7
Choosing Between Two Options
8
Quiz: Conditional execution
9
Quiz: if-else
10
Chained if-else
11
else if Statement
12
Quiz: Conditional execution
13
Order of Conditions
14
Quiz: Chained Conditions
15
Nested if Statements
16
When to Nest vs Chain
17
Quiz: Conditional execution
18
The Dangling else Problem
19
Quiz: Nested if
20
Comparison in Conditions
21
Combining Conditions with &&
22
Challenge: Grade Calculator
23
Quiz: Equality check
24
Combining Conditions with ||
25
Negating Conditions with !
26
Quiz: Logical Operators
27
The switch Statement
28
switch Syntax
29
Quiz: Multi-way branching
30
The break Keyword
31
Fall-through Behavior
32
Quiz: Loop exit
33
The default Case
34
Quiz: switch Statement
35
switch vs if-else
36
Common Condition Mistakes
37
Quiz: Conditional execution
38
Problem - Grade Calculator
39
Problem - Simple Calculator
40
Problem - Leap Year
41
Problem - Team
42
Team - The Idea
43
Team - Algorithm
44
Quiz: Knowledge check
45
Team - Implementation
46
Lessons from Team
47
Problem - Helpful Maths
48
Helpful Maths - The Idea
49
Helpful Maths - Algorithm
50
Quiz: Knowledge check
51
Helpful Maths - Implementation
52
Lessons from Helpful Maths
53
Section Recap
Loops
0/58
1
Intro
2
What is a Loop?
3
The while Loop
4
while Loop Syntax
5
Loop Condition
6
Quiz: while Basics
7
Counting with while
8
Infinite Loops
9
Loop Variables
10
Quiz: while Patterns
11
The for Loop
12
for Loop Syntax
13
The Initialization Part
14
The Condition Part
15
Quiz: Repetition basics
16
The Update Part
17
Challenge: Print Numbers
18
Quiz: for Loop Structure
19
Counting Up
20
Counting Down
21
Quiz: Post-check loop
22
Custom Step Sizes
23
Challenge: Sum of Numbers
24
Quiz: for Variations
25
for vs while
26
The do-while Loop
27
Quiz: Condition-based loop
28
do-while Syntax
29
When to Use do-while
30
Quiz: Condition-based loop
31
Quiz: do-while
32
The break Statement
33
Breaking from Loops
34
Challenge: Factorial
35
Quiz: Loop exit
36
The continue Statement
37
Skipping to Next Iteration
38
Quiz: Skip iteration
39
Quiz: break and continue
40
Nested Loops
41
Nested Loop Patterns
42
Common Loop Mistakes
43
Problem - Sum of Numbers
44
Problem - Football
45
Football - Core Idea
46
Football - Algorithm
47
Quiz: Repetition basics
48
Football - Implementation
49
Football - Walkthrough
50
Lessons from Football
51
Problem - Nearly Lucky
52
Nearly Lucky - Core Idea
53
Nearly Lucky - Algorithm
54
Quiz: Repetition basics
55
Nearly Lucky - Implementation
56
Nearly Lucky - Walkthrough
57
Lessons from Nearly Lucky
58
Section Recap
Arrays
0/50
1
Intro
2
What is an Array?
3
Why Use Arrays?
4
Declaring Arrays
5
Array Size
6
Quiz: Array Basics
7
Accessing Elements
8
Zero-Based Indexing
9
Quiz: Zero-based indexing
10
Out of Bounds Access
11
Quiz: Array Indexing
12
Initializing Arrays
13
Partial Initialization
14
Uniform Initialization
15
Quiz: Initialization
16
Iterating with for Loop
17
Challenge: Array Sum
18
The Array-Loop Pattern
19
Finding the Size
20
Quiz: Iteration
21
Modifying Elements
22
Common Array Operations
23
Challenge: Find Maximum
24
Finding Minimum
25
Finding Maximum
26
Quiz: Collection basics
27
Counting Elements
28
Quiz: Array Operations
29
Passing Arrays to Functions
30
Array Decay
31
Passing Size Separately
32
Quiz: Functions with Arrays
33
Multidimensional Arrays
34
2D Array Syntax
35
Nested Loops for 2D
36
Problem - Reverse Array
37
Problem - Find Duplicates
38
Problem - Stones on Table
39
Stones - The Idea
40
Stones - Algorithm
41
Quiz: Collection basics
42
Stones - Implementation
43
Lessons from Stones
44
Problem - George & Rooms
45
George - The Idea
46
George - Algorithm
47
Quiz: Collection basics
48
George - Implementation
49
Lessons from George
50
Section Recap
Strings
0/46
1
Intro
2
What is a String?
3
C-style vs C++ Strings
4
The string Class
5
Declaring Strings
6
Quiz: Text storage
7
Quiz: String Basics
8
String Initialization
9
Empty Strings
10
String Length
11
Quiz: String Properties
12
Accessing Characters
13
Modifying Characters
14
Bounds Checking with at
15
Quiz: Character Access
16
String Concatenation
17
The + Operator
18
The += Operator
19
Quiz: Concatenation
20
Comparing Strings
21
Lexicographic Order
22
Case Sensitivity
23
Quiz: Comparison
24
String Input with cin
25
String Input with getline
26
The Newline Problem
27
Quiz: String Input
28
Substrings
29
Finding in Strings
30
The npos Constant
31
Quiz: Searching
32
Iterating Over Strings
33
Range-based for Loop
34
Problem - Reverse String
35
Problem - Count Vowels
36
Problem - Petya and Strings
37
Petya and Strings - The Idea
38
Petya and Strings - Algorithm
39
Petya and Strings - Implementation
40
Lessons from Petya and Strings
41
Problem - String Task
42
String Task - The Idea
43
String Task - Algorithm
44
String Task - Implementation
45
Lessons from String Task
46
Section Recap
Functions
0/50
1
Intro
2
What is a Function?
3
Function Syntax
4
Calling Functions
5
Void Functions
6
Quiz: Function Basics
7
Return Statements
8
Quiz: Code organization
9
Parameters vs Arguments
10
Pass by Value
11
Quiz: Function inputs
12
Challenge: Square Function
13
Multiple Parameters
14
Default Parameters
15
Quiz: Function inputs
16
Function Declarations vs Definitions
17
Header Files Basics
18
Challenge: Is Positive
19
Scope
20
Quiz: Understanding #include
21
Variable Lifetime
22
Function Overloading
23
Recursion Basics
24
Quiz: Code organization
25
Helper Functions
26
Problem: Temperature Converter
27
Problem: Is Even or Odd
28
Quiz: Function Design
29
Problem: Find Maximum
30
Problem: Calculate Average
31
Problem: Print Rectangle
32
Problem: Validate Range
33
Problem: Count Digits
34
Problem: Is Prime
35
Quiz: Function Parameters
36
Problem: Swap Two Numbers
37
Problem: Factorial
38
Problem - Domino piling
39
Domino piling - The Idea
40
Domino piling - Algorithm
41
Quiz: Post-check loop
42
Domino piling - Implementation
43
Lessons from Domino piling
44
Problem - Young Physicist
45
Young Physicist - The Idea
46
Young Physicist - Algorithm
47
Quiz: Code organization
48
Young Physicist - Implementation
49
Lessons from Young Physicist
50
Section Recap
Pointers & References
0/52
1
Intro
2
Memory Addresses
3
The Address-of Operator
4
What is a Pointer?
5
Quiz: Pointer Basics
6
Pointer Declaration
7
Dereferencing Pointers
8
Quiz: Pointer Operations
9
Pointer Initialization
10
Pointers and Arrays
11
Pointer Arithmetic
12
Quiz: Pointer Arithmetic
13
What is a Reference?
14
Reference Declaration
15
Quiz: Variable alias
16
References vs Pointers
17
Quiz: References
18
Pass by Reference
19
Const References
20
Quiz: Variable alias
21
When to Use Pointers vs References
22
Quiz: Pass by Reference
23
Common Pointer Errors
24
Memory Safety Basics
25
Problem: Swap Two Numbers
26
Quiz: Swap Implementation
27
Problem: Sum Array Elements
28
Problem: Find Maximum
29
Quiz: Pointer Traversal
30
Problem: Modify via Pointer
31
Problem: Count References
32
Quiz: Reference Behavior
33
Problem: Safe Pointer Check
34
Problem: Array Reversal
35
Quiz: Array Reversal
36
Problem: Reference Parameters
37
Problem: Const Correctness
38
Quiz: Const References
39
Problem - Presents
40
Presents - The Idea
41
Presents - Algorithm
42
Presents - Implementation
43
Presents - Walkthrough
44
Lessons from Presents
45
Quiz: Integer type
46
Problem - Beautiful Matrix
47
Beautiful Matrix - The Idea
48
Beautiful Matrix - Algorithm
49
Quiz: Conditional execution
50
Beautiful Matrix - Implementation
51
Lessons from Beautiful Matrix
52
Section Recap
Structs
0/44
1
Intro
2
What is a Struct?
3
Defining a Struct
4
Creating Struct Variables
5
Accessing Members
6
Quiz: Struct Basics
7
Modifying Members
8
Initializing Structs
9
Quiz: Custom data types
10
Default Values
11
Structs with Arrays
12
Arrays of Structs
13
Quiz: Custom data types
14
Nested Access
15
Passing Structs to Functions
16
Pass by Value
17
Quiz: Custom data types
18
Pass by Reference
19
Const References
20
Quiz: Variable alias
21
Returning Structs
22
Nested Structs
23
Accessing Nested Members
24
Quiz: Nested Structs
25
Structs vs Classes
26
Problem - Point Distance
27
Problem - Student Records
28
Problem - Rectangle Area
29
Quiz: Struct Applications
30
Common Mistakes
31
When to Use Structs
32
Problem - Young Physicist
33
Young Physicist - The Idea
34
Young Physicist - Algorithm
35
Quiz: Custom data types
36
Young Physicist - Implementation
37
Lessons from Young Physicist
38
Problem - Games
39
Games - The Idea
40
Games - Algorithm
41
Quiz: Custom data types
42
Games - Implementation
43
Lessons from Games
44
Section Recap
Vectors & STL Basics
0/48
1
Intro
2
What is a Vector?
3
Including the Vector Header
4
Creating Vectors
5
Quiz: Vector Basics
6
Vector Initialization
7
Accessing Elements
8
Quiz: Dynamic arrays
9
Vector Size and Capacity
10
Adding Elements
11
Removing Elements
12
Quiz: Dynamic arrays
13
Inserting and Erasing
14
Clearing Vectors
15
Iterating Over Vectors
16
Quiz: Dynamic arrays
17
Range-Based For Loops
18
Vectors and Functions
19
Passing by Reference
20
Quiz: Dynamic arrays
21
2D Vectors
22
Common Vector Operations
23
Quiz: Dynamic arrays
24
Sorting Vectors
25
Problem: Finding Maximum
26
Problem: Removing Duplicates
27
Problem: Counting Occurrences
28
Quiz: Vector Problems
29
Problem: Reversing a Vector
30
Problem: Sum of Elements
31
Problem: Building Dynamically
32
Vector vs Array
33
Common Mistakes
34
Quiz: Dynamic arrays
35
Performance Tips
36
Problem - Xenia and Ringroad
37
Xenia - The Pattern
38
Xenia - Algorithm
39
Quiz: Dynamic arrays
40
Xenia - Implementation
41
Lessons from Xenia
42
Problem - Dragons
43
Dragons - The Pattern
44
Dragons - Algorithm
45
Quiz: Dynamic arrays
46
Dragons - Implementation
47
Lessons from Dragons
48
Section Recap
Maps & Sets
0/52
1
Intro
2
What is a Map?
3
Creating Maps
4
Inserting Elements
5
Quiz: Map Insertion
6
Accessing Elements
7
Checking Key Existence
8
Quiz: Key-value storage
9
Iterating Over Maps
10
Quiz: Map Iteration
11
Erasing Elements
12
Map vs Unordered Map
13
Quiz: Key-value storage
14
Quiz: Map Choice
15
What is a Set?
16
Creating Sets
17
Quiz: Unique elements
18
Inserting into Sets
19
Checking Membership
20
Quiz: Unique elements
21
Quiz: Set Membership
22
Iterating Over Sets
23
Erasing from Sets
24
Quiz: Unique elements
25
Set vs Unordered Set
26
Multiset
27
Quiz: Unique elements
28
Multimap
29
Lower and Upper Bound
30
Quiz: Key-value storage
31
Quiz: Set Operations
32
Frequency Counting
33
Deduplication
34
Quiz: Key-value storage
35
Two Sum Problem
36
Unique Characters
37
Group Anagrams
38
Quiz: Problem Solving
39
Custom Comparators
40
Problem - Boy or Girl
41
Boy or Girl - The Idea
42
Boy or Girl - Algorithm
43
Quiz: Key-value storage
44
Boy or Girl - Implementation
45
Lessons from Boy or Girl
46
Problem - Registration System
47
Registration - The Idea
48
Registration - Algorithm
49
Quiz: Key-value storage
50
Registration - Implementation
51
Lessons from Registration
52
Section Recap
Pairs & Tuples
0/53
1
Intro
2
What is a Pair?
3
Creating Pairs
4
Accessing Elements
5
Quiz: Pair Access
6
Comparing Pairs
7
Pairs in Vectors
8
Quiz: Two-value container
9
Sorting Pairs
10
Quiz: Sorting Pairs
11
Pairs with Maps
12
What is a Tuple?
13
Quiz: Two-value container
14
Creating Tuples
15
Quiz: Tuple Creation
16
Accessing Tuple Elements
17
Structured Bindings
18
Tuple Comparison
19
Quiz: Tuple Comparison
20
Tie Function
21
Pair vs Tuple vs Struct
22
Quiz: Two-value container
23
Returning Multiple Values
24
Quiz: Return Values
25
Coordinates and Points
26
Graph Edges
27
Priority Queue with Pairs
28
Quiz: Use Cases
29
Map Iteration Patterns
30
Nested Pairs
31
Quiz: Two-value container
32
Const Correctness
33
Quiz: References
34
Swap and Assignment
35
Type Deduction Gotchas
36
Quiz: Two-value container
37
Practice: Coordinate Sorting
38
Practice: Map Statistics
39
Quiz: Key-value storage
40
Practice: Multi-Value Return
41
Problem - Arrival of the General
42
General - The Pattern
43
General - Algorithm
44
Quiz: Two-value container
45
General - Implementation
46
Lessons from General
47
Problem - George and Accommodation
48
George - The Pattern
49
George - Algorithm
50
Quiz: Two-value container
51
George - Implementation
52
Lessons from George
53
Section Recap
STL Algorithms
0/50
1
Intro
2
The Algorithm Header
3
sort Basics
4
Custom Comparators
5
Quiz: Algorithm Basics
6
reverse
7
min_element and max_element
8
Quiz: min_element Usage
9
find
10
count
11
binary_search
12
Quiz: binary_search Requirements
13
lower_bound
14
upper_bound
15
Bounds Example
16
Quiz: lower_bound vs upper_bound
17
accumulate
18
fill
19
unique
20
Quiz: unique Behavior
21
Unique Pattern
22
next_permutation
23
Permutation Example
24
Quiz: next_permutation Setup
25
Combining Algorithms
26
Pattern: Sort and Count
27
Quiz: Ordering elements
28
Pattern: Transform and Filter
29
Quiz: Algorithm Complexity
30
Common Mistakes
31
Iterator Safety
32
Performance Tips
33
Practice: Array Manipulation
34
Quiz: Counter-based loop
35
Quiz: Practical Application
36
Practice: Binary Search Variants
37
Practice: Permutation Problems
38
Problem - Helpful Maths
39
Helpful Maths - The Pattern
40
Helpful Maths - Algorithm
41
Quiz: Knowledge check
42
Helpful Maths - Implementation
43
Lessons from Helpful Maths
44
Problem - Arrival of the General
45
Arrival - The Pattern
46
Arrival - Algorithm
47
Quiz: Knowledge check
48
Arrival - Implementation
49
Lessons from Arrival
50
Section Recap
Classes & Objects
0/54
1
Intro
2
What is a Class?
3
What is an Object?
4
Defining a Class
5
Creating Objects
6
Quiz: Default access
7
Access Specifiers
8
Why Use Private?
9
Quiz: Conditional execution
10
Member Variables
11
Member Functions
12
Quiz: Member access
13
Accessing Members with Dot Operator
14
Quiz: Classes and Objects Basics
15
The this Pointer
16
Getters and Setters
17
What is a Constructor?
18
Default Constructor
19
Quiz: Custom data types
20
Parameterized Constructor
21
Constructor Overloading
22
Member Initializer Lists
23
Quiz: Constructors
24
What is a Destructor?
25
Destructor Syntax and Usage
26
RAII Concept
27
When Destructors Run
28
Quiz: Custom data types
29
Quiz: Destructors and RAII
30
Copy Constructor Basics
31
Default vs Custom Copy Constructor
32
Class vs Struct Differences
33
Quiz: Copy Constructor
34
Static Members
35
Const Member Functions
36
Quiz: Member access
37
Quiz: Static and Const Members
38
Practice: Bank Account Class
39
Practice: Dynamic String Class
40
Quiz: Default access
41
Quiz: Full Review
42
Problem - Young Physicist
43
Young Physicist - The Pattern
44
Young Physicist - Algorithm
45
Quiz: Default access
46
Young Physicist - Implementation
47
Lessons from Young Physicist
48
Problem - Games
49
Games - The Pattern
50
Games - Algorithm
51
Quiz: Default access
52
Games - Implementation
53
Lessons from Games
54
Section Recap
Inheritance & Polymorphism
0/56
1
Intro
2
What is Inheritance?
3
Base Class and Derived Class
4
Inheritance Syntax
5
What Gets Inherited?
6
Quiz: Class extension
7
Quiz: Inheritance Basics
8
Access Specifiers in Inheritance
9
Protected Members
10
Quiz: Class extension
11
Constructor Inheritance and Calling Base
12
Destructor Order in Inheritance
13
Quiz: Class extension
14
Method Overriding
15
Quiz: Method Overriding
16
Hiding vs Overriding
17
What is Polymorphism?
18
Quiz: Class extension
19
Virtual Functions
20
The Virtual Keyword
21
Quiz: Polymorphism
22
How Virtual Functions Work
23
Quiz: Virtual Functions
24
Pure Virtual Functions
25
Abstract Classes
26
Quiz: Code organization
27
Concrete vs Abstract Classes
28
Interfaces in C++
29
Virtual Destructors
30
Quiz: Virtual Destructors
31
Override Keyword
32
Final Keyword
33
Quiz: Class extension
34
Multiple Inheritance Basics
35
Diamond Problem
36
Quiz: Multiple Inheritance
37
When to Use Inheritance vs Composition
38
Practice: Animal Hierarchy
39
Quiz: Class extension
40
Practice: Shape Interface
41
Quiz: Inheritance Design
42
Practice: Virtual Destructor Bug
43
Practice: Override vs Final
44
Problem - Force Vectors
45
Force Vectors - The Idea
46
Force Vectors - Algorithm
47
Quiz: Counter-based loop
48
Force Vectors - Implementation
49
Lessons from Force Vectors
50
Problem - Team Uniforms
51
Team Uniforms - The Idea
52
Team Uniforms - Algorithm
53
Quiz: Conditional execution
54
Team Uniforms - Implementation
55
Lessons from Team Uniforms
56
Section Recap
File I/O
0/49
1
Intro
2
The fstream Header
3
What is ifstream?
4
What is ofstream?
5
Opening a File for Reading
6
Quiz: Counter-based loop
7
Opening a File for Writing
8
Checking if File Opened Successfully
9
Quiz: Conditional execution
10
Quiz: Opening Files
11
Reading with >> Operator
12
Reading Line by Line
13
Reading Word by Word
14
Reading Character by Character
15
Quiz: Character type
16
Writing with << Operator
17
Writing Lines
18
Closing Files
19
Quiz: Reading Methods
20
File Modes
21
Appending to Files
22
Binary vs Text Files
23
Reading Binary Data
24
Quiz: Knowledge check
25
Writing Binary Data
26
Quiz: Binary Mode
27
File Position
28
tellg and tellp
29
Checking End of File
30
Common File I/O Patterns
31
Quiz: Knowledge check
32
Error Handling with Files
33
Quiz: Error States
34
RAII and File Streams
35
Practice: Copy File Contents
36
Practice: Count Lines in File
37
Quiz: File I/O Patterns
38
Problem - Word Counter
39
Word Counter - The Idea
40
Word Counter - Algorithm
41
Word Counter - Implementation
42
Lessons from Word Counter
43
Problem - Log Analyzer
44
Log Analyzer - The Idea
45
Log Analyzer - Algorithm
46
Quiz: Knowledge check
47
Log Analyzer - Implementation
48
Lessons from Log Analyzer
49
Section Recap
Exception Handling
0/54
1
Intro
2
What Are Exceptions?
3
Why Exceptions?
4
The try Block
5
The throw Statement
6
Quiz: Exception handling
7
The catch Block
8
Basic try-catch Example
9
Quiz: Exception handling
10
Quiz: try-catch Basics
11
Catching by Value vs Reference
12
Multiple catch Blocks
13
Quiz: Variable alias
14
Catch-All Handler (catch(...))
15
Standard Exception Classes
16
Quiz: Error signaling
17
std::exception Base Class
18
std::runtime_error and std::logic_error
19
Quiz: Error signaling
20
Quiz: Exception Categories
21
std::out_of_range, std::invalid_argument
22
Creating Custom Exceptions
23
Quiz: Error signaling
24
Inheriting from std::exception
25
The what Method
26
Quiz: Error signaling
27
Rethrowing Exceptions
28
Exception Propagation
29
Quiz: Error signaling
30
Quiz: Stack Unwinding
31
noexcept Specifier
32
When to Use Exceptions
33
Quiz: Error signaling
34
Exceptions vs Error Codes
35
Quiz: When to Use Exceptions
36
Exception Safety Basics
37
RAII and Exceptions
38
Quiz: Error signaling
39
Quiz: Exception Safety
40
Practice Problems
41
Section 18 Recap
42
Problem - Safe Division
43
Safe Division - The Idea
44
Safe Division - Algorithm
45
Quiz: Integer division
46
Safe Division - Implementation
47
Lessons from Safe Division
48
Problem - Input Validator
49
Input Validator - The Idea
50
Input Validator - Algorithm
51
Quiz: Error signaling
52
Input Validator - Implementation
53
Lessons from Input Validator
54
Section Recap
Dynamic Memory
0/50
1
Intro
2
Stack vs Heap
3
Stack Memory
4
Heap Memory
5
The new Operator
6
Quiz: Memory Basics
7
The delete Operator
8
new and delete for Arrays
9
Quiz: Memory cleanup
10
Quiz: new and delete
11
Memory Leaks
12
Dangling Pointers
13
Double Delete
14
nullptr After delete
15
When to Use Dynamic Memory
16
Quiz: Memory cleanup
17
Dynamic Arrays
18
Resizing Dynamic Arrays Manually
19
Quiz: Memory Leaks
20
Problems with Raw Pointers
21
Introduction to Smart Pointers
22
What is unique_ptr?
23
Creating unique_ptr
24
unique_ptr Automatic Cleanup
25
Quiz: Knowledge check
26
Moving unique_ptr
27
Quiz: unique_ptr
28
What is shared_ptr?
29
Creating shared_ptr
30
Reference Counting
31
When shared_ptr Deletes
32
Quiz: Variable alias
33
weak_ptr Basics
34
Quiz: shared_ptr
35
Choosing the Right Smart Pointer
36
Smart Pointers vs Raw Pointers
37
Practice Problems
38
Quiz: Smart Pointer Choice
39
Problem - Flexible Array
40
Flexible Array - The Idea
41
Flexible Array - Algorithm
42
Flexible Array - Implementation
43
Lessons from Flexible Array
44
Problem - Node Creation
45
Node Creation - The Idea
46
Node Creation - Algorithm
47
Quiz: Knowledge check
48
Node Creation - Implementation
49
Lessons from Node Creation
50
Section Recap
C++ - Roadmaps | Repovive