Sign up to track your progress
Create an account to save your progress, complete exercises, and earn achievements.
C++ Programming Fundamentals
Learn the fundamentals of C++ programming from scratch. This comprehensive course covers variables, data types, control structures, functions, and basic object-oriented programming concepts.
This course is designed for complete beginners who want to learn C++ programming. You'll start with the basics and gradually build up to more complex concepts. By the end of this course, you'll have a solid foundation in C++ programming and be ready to tackle more advanced topics.
Course Curriculum
C++ Basics (15 lessons)
Introduction to C++ basics
Overview of fundamental C++ concepts and terminology you'll master in this chapter.
25 minutes
Your First C++ Program: Hello World!
Write your first C++ program that displays "Hello, World!" to the console.
25 minutes
Understanding and Reading C++ Errors
Master the essential skill of reading and interpreting compiler error messages to debug your code effectively.
40 minutes
Statements and the structure of a program
Learn how C++ programs are organized and understand the basic structure of statements.
45 minutes
Comments
Learn to document your code with comments and understand best practices for code documentation.
30 minutes
Introduction to objects and variables
Understand what objects and variables are, and learn the common data types in C++.
50 minutes
Variable assignment and initialization
Learn the difference between assignment and initialization, and how to work with variable values safely.
40 minutes
Introduction to iostream: std::cout, std::cin, and std::endl
Master basic input and output operations using std::cout and std::cin.
45 minutes
Uninitialized variables and undefined behavior
Understand the dangers of uninitialized variables and learn to avoid undefined behavior.
35 minutes
Keywords and naming identifiers
Learn C++ keywords and best practices for naming variables and identifiers.
40 minutes
Whitespace and basic formatting
Understand how to format your code for maximum readability and maintainability.
25 minutes
Introduction to literals and operators
Learn about fixed values (literals) and basic operators for mathematical calculations.
35 minutes
Introduction to expressions
Master combining values, variables, and operators to create expressions that produce results.
40 minutes
Developing your first program
Walk through the complete process of developing a C++ program from planning to implementation.
50 minutes
C++ Basics summary
Review and test your understanding of all fundamental C++ concepts covered in this chapter.
30 minutes
C++ Basics: Functions and Files (14 lessons)
Introduction to functions
Learn the basics of creating and calling functions in C++.
45 minutes
Function return values (value-returning functions)
Understand how functions can return values to the caller.
40 minutes
Void functions (non-value returning functions)
Learn about functions that perform actions without returning values.
35 minutes
Introduction to function parameters and arguments
Master passing data to functions through parameters.
50 minutes
Introduction to local scope
Understand variable scope within functions and blocks.
35 minutes
Why functions are useful and how to use them effectively
Learn when and why to use functions in your programs.
30 minutes
Forward declarations and definitions
Understand function declarations and definitions.
40 minutes
Programs with multiple code files
Learn to organize code across multiple source files.
45 minutes
Naming collisions and an introduction to namespaces
Prevent naming conflicts using namespaces.
35 minutes
Introduction to the preprocessor
Understand preprocessor directives and their uses.
40 minutes
Header files
Learn to create and use header files effectively.
45 minutes
Header guards
Prevent multiple inclusion problems with header guards.
35 minutes
How to design your first programs
Learn systematic approaches to program design.
50 minutes
Chapter 2 summary and quiz
Learn about Chapter 2 summary and quiz in C++.
30 minutes
Debugging C++ Programs (11 lessons)
Syntax and semantic errors
Learn to identify and fix different types of programming errors.
30 minutes
The debugging process
Understand systematic approaches to finding and fixing bugs.
35 minutes
A strategy for debugging
Develop effective debugging methodologies.
40 minutes
Basic debugging tactics
Learn practical techniques for debugging C++ programs.
45 minutes
More debugging tactics
Learn practical techniques for debugging C++ programs.
40 minutes
Using an integrated debugger: Stepping
Master using IDE debugging tools effectively.
50 minutes
Using an integrated debugger: Running and breakpoints
Master using IDE debugging tools effectively.
45 minutes
Using an integrated debugger: Watching variables
Master using IDE debugging tools effectively.
40 minutes
Using an integrated debugger: The call stack
Master using IDE debugging tools effectively.
35 minutes
Finding issues before they become problems
Learn preventive programming techniques.
30 minutes
Chapter 3 summary and quiz
Learn about Chapter 3 summary and quiz in C++.
25 minutes
Fundamental Data Types (13 lessons)
Introduction to fundamental data types
Learn about the basic data types available in C++.
35 minutes
Void
Understand the void type and its uses in C++.
20 minutes
Object sizes and the sizeof operator
Learn to determine the size of data types and objects.
30 minutes
Signed integers
Understand signed integer types and their ranges.
35 minutes
Unsigned integers and why to avoid them
Understand the void type and its uses in C++.
40 minutes
Fixed-width integers and size_t
Understand fixed-width integer types for predictable sizes.
35 minutes
Introduction to scientific notation
Learn how scientific notation works with floating-point numbers.
25 minutes
Floating point numbers
Understand floating-point representation and precision.
40 minutes
Boolean values
Learn about boolean data type and logical values.
25 minutes
Introduction to if statements
Introduction to conditional execution with if statements.
45 minutes
Chars
Understand character data type and ASCII representation.
30 minutes
Introduction to type conversion and static_cast
Learn about converting between different data types.
40 minutes
Chapter 4 summary and quiz
Learn about Chapter 4 summary and quiz in C++.
30 minutes
Constants and Strings (10 lessons)
Constant variables (named constants)
Learn to create unchangeable named values in your programs.
35 minutes
Literals
Understand different types of literal values in C++.
30 minutes
Numeral systems (decimal binary hexadecimal and octal)
Learn about different number bases: binary, octal, decimal, hexadecimal.
40 minutes
The as-if rule and compile-time optimization
Understand compiler optimization and the as-if rule.
30 minutes
Constant expressions
Learn about expressions that can be evaluated at compile time.
35 minutes
Constexpr variables
Master compile-time constants with constexpr.
40 minutes
Introduction to std::string
Learn to work with text strings using the standard library.
45 minutes
Introduction to std::string_view
Learn to work with text strings using the standard library.
40 minutes
std::string_view (part 2)
Learn to work with text strings using the standard library.
35 minutes
Chapter 5 summary and quiz
Learn about Chapter 5 summary and quiz in C++.
25 minutes
Operators (9 lessons)
Operator precedence and associativity
Learn the order in which operators are evaluated.
40 minutes
Arithmetic operators
Master basic mathematical operations in C++.
35 minutes
Remainder and Exponentiation
Understand modulo operations and power calculations.
30 minutes
Increment/decrement operators and side effects
Learn prefix and postfix increment/decrement operators.
40 minutes
The comma operator
Understand the comma operator and its uses.
25 minutes
The conditional operator
Learn the ternary operator for conditional expressions.
35 minutes
Relational operators and floating point comparisons
Master comparison operators and floating-point comparisons.
40 minutes
Logical operators
Understand boolean logic with AND, OR, and NOT operators.
35 minutes
Chapter 6 summary and quiz
Learn about Chapter 6 summary and quiz in C++.
25 minutes
Control Flow (16 lessons)
Control flow introduction
Learn to control the execution path of your programs.
30 minutes
If statements and blocks
Introduction to conditional execution with if statements.
40 minutes
Common if statement problems
Learn about Common if statement problems in C++.
35 minutes
Constexpr if statements
Introduction to conditional execution with if statements.
40 minutes
Switch statement basics
Master multi-way branching with switch statements.
45 minutes
Switch fallthrough and scoping
Understand switch fallthrough behavior and variable scope.
40 minutes
Goto statements
Learn about goto statements and why to avoid them.
25 minutes
Introduction to loops and while statements
Master repetitive execution with while loops.
45 minutes
Do while statements
Learn post-test loops with do-while statements.
35 minutes
For statements
Master the most common loop construct in C++.
45 minutes
Break and continue
Control loop execution with break and continue statements.
30 minutes
Halts (exiting your program early)
Learn to exit programs early with halt functions.
35 minutes
Introduction to random number generation
Generate random numbers for games and simulations.
40 minutes
Generating random numbers using Mersenne Twister
Use high-quality random number generation.
45 minutes
Global random numbers (Random.h)
Organize random number generation in larger programs.
35 minutes
Chapter 8 summary and quiz
Learn about Chapter 8 summary and quiz in C++.
30 minutes
Error Detection and Handling (7 lessons)
Introduction to testing your code
Learn systematic approaches to testing C++ programs.
40 minutes
Code coverage
Understand how much of your code is being tested.
30 minutes
Common semantic errors in C++
Learn to identify and fix logic errors in C++ programs.
45 minutes
Detecting and handling errors
Master error detection and handling strategies.
40 minutes
std::cin and handling invalid input
Learn to handle invalid user input safely.
45 minutes
Assert and static_assert
Use assertions for debugging and compile-time checks.
35 minutes
Chapter 9 summary and quiz
Learn about Chapter 9 summary and quiz in C++.
25 minutes
Compound Types: Enums and Structs (17 lessons)
Introduction to program-defined (user-defined) types
Learn to create your own custom data types.
35 minutes
Unscoped enumerations
Create named constants with traditional enums.
40 minutes
Unscoped enumerator integral conversions
Understand how enums convert to integers.
35 minutes
Converting an enumeration to and from a string
Learn about Converting an enumeration to and from a string in C++.
45 minutes
Introduction to overloading the I/O operators
Customize input/output operations for your types.
50 minutes
Scoped enumerations (enum classes)
Use modern enum classes for type safety.
40 minutes
Introduction to structs members and member selection
Group related data together with structures.
45 minutes
Struct aggregate initialization
Initialize structs with brace initialization.
40 minutes
Default member initialization
Set default values for struct members.
35 minutes
Passing and returning structs
Use structs as function parameters and return values.
45 minutes
Struct miscellany
Additional struct features and best practices.
30 minutes
Member selection with pointers and references
Access struct members through pointers and references.
50 minutes
Class templates
Create generic classes that work with different types.
60 minutes
Class template argument deduction (CTAD) and deduction guides
Let the compiler deduce template arguments automatically.
45 minutes
Alias templates
Create convenient names for complex template types.
35 minutes
Chapter 13 summary and quiz
Learn about Chapter 13 summary and quiz in C++.
30 minutes
Using a language reference
Learn to use C++ language documentation effectively.
25 minutes
Dynamic arrays: std::vector (13 lessons)
Introduction to containers and arrays
Introduction to storing collections of data.
40 minutes
Introduction to std::vector and list constructors
Master dynamic arrays with the vector container.
45 minutes
std::vector and the unsigned length and subscript problem
Master dynamic arrays with the vector container.
40 minutes
Passing std::vector
Master dynamic arrays with the vector container.
35 minutes
Returning std::vector and an introduction to move semantics
Master dynamic arrays with the vector container.
50 minutes
Arrays and loops
Iterate through container elements effectively.
40 minutes
Arrays loops and sign challenge solutions
Learn about Arrays loops and sign challenge solutions in C++.
35 minutes
Range-based for loops (for-each)
Use modern C++ range-based for loops.
45 minutes
Array indexing and length using enumerators
Access container elements by index using enums.
35 minutes
std::vector resizing and capacity
Master dynamic arrays with the vector container.
40 minutes
std::vector and stack behavior
Master dynamic arrays with the vector container.
35 minutes
std::vector<bool>
Master dynamic arrays with the vector container.
30 minutes
Chapter 16 summary and quiz
Learn about Chapter 16 summary and quiz in C++.
25 minutes
Iterators and Algorithms (under construction) (4 lessons)
Sorting an array using selection sort
Learn basic sorting algorithms like selection sort.
45 minutes
Introduction to iterators
Understand iterators for traversing containers.
40 minutes
Introduction to standard library algorithms
Use STL algorithms for common operations.
50 minutes
Timing your code
Measure and optimize program performance.
30 minutes
Input and Output (I/O) (7 lessons)
Input and output (I/O) streams
Learn about Input and output (I/O) streams in C++.
40 minutes
Input with istream
Read data from input streams effectively.
35 minutes
Output with ostream and ios
Write data to output streams with formatting.
40 minutes
Stream classes for strings
Use stringstreams for string manipulation.
35 minutes
Stream states and input validation
Handle stream errors and validate input.
45 minutes
Basic file I/O
Read from and write to files.
50 minutes
Random file I/O
Access file data at arbitrary positions.
40 minutes