Learn C++
A free, interactive online C++ course. You write C++ on every lesson - basics, pointers, classes, templates - with AI hints when the compiler yells at you, and a free certificate when you finish.
219,072+ codders enrolled
- Beginner friendly
AI-assisted coding help
Hands-on interactive lessons
Audio narration on every lesson
Quizzes to test your knowledge
Free certificate of completion
Syllabus
Section 1
Fundamentals
Start sectionStartExpandCollapseBuild a strong foundation with essential concepts and basic skillsIntroduction
4 lessons325- 01C++Challenge
- 02Hello World!ChallengeQuiz
- 03CommentsQuiz
- 04Basic Program StructureChallengeQuiz
Variables Part 1
6 lessons846- 01Whole NumbersChallengeMasteryQuiz
- 02Real NumbersChallengeMasteryQuiz
- 03StringChallengeQuiz
- 04BooleanChallengeQuiz
- 05CharChallengeQuiz
- 06ConstantsChallengeQuiz
Variables Part 2
5 lessons334- 01Type DeclarationChallengeQuiz
- 02Naming ConventionsQuiz
- 03Recap - Initialize VariablesChallenge
- 04Type Casting Part 1ChallengeQuiz
- 05Type Casting Part 2Quiz
Operators Part 1
7 lessons654- 01Arithmetic OperatorsChallengeQuiz
- 02Modulo OperatorChallengeQuiz
- 03Increment/DecrementChallengeQuiz
- 04Post Increment/DecrementChallengeQuiz
- 05Arithmetic ShortcutsChallengeQuiz
- 06Comparison OperatorsChallengeQuiz
- 07String ComparisonQuiz
Operators Part 2
4 lessons423- 01Logical Operators Part 1ChallengeQuiz
- 02Logical Operators Part 2ChallengeQuiz
- 03Recap - Simple LogicChallenge
- 04Logical Operators Part 3ChallengeQuiz
Decision Making
6 lessons637- 01If StatementChallengeQuiz
- 02If - ElseChallengeQuiz
- 03Switch StatementChallengeQuiz
- 04Conditional OperatorChallengeQuiz
- 05Recap - If ElseChallenge
- 06Nested If - ElseChallengeQuiz
Input/Output Basics
5 lessons524- 01cout StatementChallengeMasteryQuiz
- 02cin StatementChallengeQuiz
- 03String InputQuiz
- 04Recap - Till 120Challenge
- 05Recap - True or FalseChallenge
Number Calculator
Project4 lessons16- 01Welcome MessageChallengeQuiz
- 02Getting NumbersProject
- 03Basic OperationsProject
- 04Formatted OutputProject
Loops
9 lessons760- 01For Loop Part 1ChallengeQuiz
- 02While LoopChallengeQuiz
- 03Do While LoopChallengeQuiz
- 04BreakChallengeQuiz
- 05ContinueChallengeQuiz
- 06For Loop Part 2Quiz
- 07Nested LoopsChallengeQuiz
- 08Infinite LoopsQuiz
- 09Recap - Dynamic InputChallenge
Functions
7 lessons739- 01Declare a FunctionChallengeQuiz
- 02ParametersChallengeMasteryQuiz
- 03Return TypesChallengeQuiz
- 04Function OverloadingQuiz
- 05Recap - Sigma FunctionChallenge
- 06Recap - Validation FunctionChallenge
- 07Void FunctionsChallengeQuiz
Arrays Basics
9 lessons848- 01Declaring ArraysChallengeQuiz
- 02Accessing ElementsChallengeQuiz
- 03Modifying ElementsChallengeQuiz
- 04Recap - Pretty Print ArrayChallenge
- 05Arrays And FunctionsQuiz
- 06Recap - Product ArrayChallenge
- 07Recap - Reversed ArrayChallenge
- 08Enhanced For LoopChallengeQuiz
- 09Common Array OperationsChallengeQuiz
Strings
5 lessons441- 01C-style Strings Part 1ChallengeQuiz
- 02C-style Strings Part 2Quiz
- 03String OperationsChallengeQuiz
- 04String Functions Part 1ChallengeQuiz
- 05String Functions Part 2ChallengeQuiz
Final Challenges
3 lessons37- 01Number PatternChallengeQuiz
- 02Pattern FinderChallenge
- 03Student Grade CalculatorChallenge
Section 2
Logic & Flow
Start sectionStartExpandCollapseDevelop problem-solving skills and create dynamic, interactive programsPointers and Memory
8 lessons757- 01What is a Pointer?Quiz
- 02Address-Of OperatorChallengeQuiz
- 03Dereference OperatorChallengeQuiz
- 04Null PointersChallengeQuiz
- 05Pointers and ArraysChallengeQuiz
- 06Dynamic Memory with 'new'ChallengeQuiz
- 07Freeing Memory with 'delete'ChallengeQuiz
- 08Recap - Pointer PracticeChallenge
Vectors (Dynamic Arrays)
9 lessons861- 01Introducing std::vectorQuiz
- 02Creating a VectorChallengeQuiz
- 03Adding ElementsChallengeQuiz
- 04Accessing ElementsChallengeQuiz
- 05Vector SizeChallengeQuiz
- 06Iterating with a For LoopChallengeQuiz
- 07Range-Based For LoopChallengeQuiz
- 08Removing ElementsChallengeQuiz
- 09Recap - Vector OperationsChallenge
Project: Task List Tool
Project5 lessons1- 01Project OverviewChallenge
- 02Adding a TaskProject
- 03Viewing TasksProject
- 04Removing a TaskProject
- 05Finishing the ToolProject
Maps (Key-Value Pairs)
7 lessons644- 01Introducing std::mapQuiz
- 02Creating a MapChallengeQuiz
- 03Accessing and Modifying ValuesChallengeQuiz
- 04Checking for KeysChallengeQuiz
- 05Removing PairsChallengeQuiz
- 06Iterating Over a MapChallengeQuiz
- 07Recap - Word FrequencyChallenge
Project: Inventory Tool
Project5 lessons1- 01Project SetupChallenge
- 02Adding and Updating ItemsProject
- 03Checking StockProject
- 04Removing StockProject
- 05Printing the Inventory ReportProject
Sets (Unique Elements)
6 lessons538- 01Introducing std::setQuiz
- 02Create Set & Add ElementsChallengeQuiz
- 03Checking for ElementsChallengeQuiz
- 04Removing ElementsChallengeQuiz
- 05Iterating Over a SetChallengeQuiz
- 06Recap - Unique NumbersChallenge
Advanced Functions
7 lessons653- 01Pass by ReferenceChallengeQuiz
- 02Intro Lambda ExpressionsChallengeQuiz
- 03Lambdas with ParametersChallengeQuiz
- 04Lambdas with Return ValuesChallengeQuiz
- 05Introduction to RecursionQuiz
- 06Recursive FactorialChallengeQuiz
- 07Lambda SortChallengeQuiz
Basic Error Handling
6 lessons540- 01Introduction to ExceptionsQuiz
- 02The 'try' and 'catch' BlocksChallengeQuiz
- 03The 'throw' KeywordChallengeQuiz
- 04Different Exception TypesChallengeQuiz
- 05The Catch-All HandlerChallengeQuiz
- 06Recap - Safe DivisionChallenge
Final Challenges
3 lessons3- 01Vector Data FilteringChallenge
- 02Map Value SearchChallenge
- 03Pointer and Dynamic ArrayChallenge
Section 3
Object Oriented Programming
Start sectionStartExpandCollapseDiscover how to organize code with classes, objects, and reusable structuresFundamentals of OOP
11 lessons1187- 01External FilesChallengeQuiz
- 02C++ Build & CompilationChallengeQuiz
- 03Header Files & Source FilesChallengeQuiz
- 04Namespaces & ScopeChallengeQuiz
- 05Introduction to OOP in C++ChallengeQuiz
- 06Classes vs ObjectsChallengeQuiz
- 07The 'this' PointerChallengeQuiz
- 08Methods (Member Functions)ChallengeQuiz
- 09Attributes (Data Members)ChallengeQuiz
- 10Ctors & Dtors BasicsChallengeQuiz
- 11Recap - Simple CalculatorChallenge
Memory Management
6 lessons644- 01Stack vs Heap MemoryChallengeQuiz
- 02Pointers and ReferencesChallengeQuiz
- 03Dynamic Memory (new/delete)ChallengeQuiz
- 04Smart Pointers in C++ChallengeQuiz
- 05RAII in C++ChallengeQuiz
- 06Recap - Dynamic Array ManagerChallenge
Constructors & Destructors
9 lessons972- 01Default ConstructorChallengeQuiz
- 02Parameterized ConstructorChallengeQuiz
- 03Copy ConstructorChallengeQuiz
- 04Move ConstructorChallengeQuiz
- 05Constructor Init ListsChallengeQuiz
- 06Delegating ConstructorsChallengeQuiz
- 07Destructor Deep DiveChallengeQuiz
- 08Rule of Three / Five / ZeroChallengeQuiz
- 09Recap - String ClassChallenge
Class Properties
7 lessons753- 01Instance vs Static MembersChallengeQuiz
- 02Getters and SettersChallengeQuiz
- 03Const Member FunctionsChallengeQuiz
- 04Mutable KeywordChallengeQuiz
- 05Static Methods and VariablesChallengeQuiz
- 06Friend Functions & ClassesChallengeQuiz
- 07Recap - Bank Account ManagerChallenge
Encapsulation
6 lessons651- 01Access Specifiers in C++ChallengeQuiz
- 02Access Specifiers In DepthChallengeQuiz
- 03Information HidingChallengeQuiz
- 04Struct vs ClassChallengeQuiz
- 05Nested & Inner ClassesChallengeQuiz
- 06Recap - Student Records SystemChallengeQuiz
Operator Overloading
8 lessons863- 01Intro to Operator OverloadChallengeQuiz
- 02Arithmetic Operator OverloadChallengeQuiz
- 03Comparison Operator OverloadChallengeQuiz
- 04Stream OperatorsChallengeQuiz
- 05Assignment Operator OverloadChallengeQuiz
- 06[] and () Operator OverloadChallengeQuiz
- 07Type Conversion OperatorsChallengeQuiz
- 08Recap - Matrix ClassChallenge
Inheritance
8 lessons862- 01Basic InheritanceChallengeQuiz
- 02Inheritance Access LevelsChallengeQuiz
- 03Ctor & Dtor Call OrderChallengeQuiz
- 04Method OverridingChallengeQuiz
- 05Virtual Functions & VTableChallengeQuiz
- 06Multiple InheritanceChallengeQuiz
- 07Virtual InheritanceChallengeQuiz
- 08Recap - Employee HierarchyChallenge
Polymorphism
8 lessons860- 01Compile vs Runtime PolymorphChallengeQuiz
- 02Function OverloadingChallengeQuiz
- 03Virtual Functions RevisitedChallengeQuiz
- 04Pure Virtual FunctionsChallengeQuiz
- 05Abstract ClassesChallengeQuiz
- 06Interface Design in C++ChallengeQuiz
- 07Dynamic Casting & RTTIChallengeQuiz
- 08Recap - Shape CalculatorChallenge
Templates
6 lessons546- 01Function TemplatesChallengeQuiz
- 02Class TemplatesChallengeQuiz
- 03Template SpecializationChallengeQuiz
- 04Variadic TemplatesChallengeQuiz
- 05SFINAE & Type Traits BasicsQuiz
- 06Recap - Generic ContainerChallenge
STL Overview
6 lessons646- 01STL Overview & PhilosophyChallengeQuiz
- 02STL ContainersChallengeQuiz
- 03IteratorsChallengeQuiz
- 04STL AlgorithmsChallengeQuiz
- 05Functors & Lambda ExpressionsChallengeQuiz
- 06Recap - Word FrequencyChallenge
Advanced OOP Concepts
7 lessons763- 01Composition vs InheritanceChallengeQuiz
- 02Mixins via CRTPChallengeQuiz
- 03Pimpl IdiomChallengeQuiz
- 04Type ErasureChallengeQuiz
- 05Enum Classes & Strong TypingChallengeQuiz
- 06Exception Handling in OOPChallengeQuiz
- 07Custom Exception HierarchiesChallengeQuiz
Modern C++ Features
7 lessons764- 01Move Semantics & RvaluesChallengeQuiz
- 02Perfect ForwardingChallengeQuiz
- 03Lambda Expressions In DepthChallengeQuiz
- 04std::function & std::bindChallengeQuiz
- 05constexpr and constevalChallengeQuiz
- 06Structured BindingsChallengeQuiz
- 07optional, variant, anyChallengeQuiz
Design Patterns Part 1
6 lessons655- 01Intro to Design PatternsChallengeQuiz
- 02Singleton PatternChallengeQuiz
- 03Factory & Abstract FactoryChallengeQuiz
- 04Builder PatternChallengeQuiz
- 05Observer PatternChallengeQuiz
- 06Strategy PatternChallengeQuiz
Design Patterns Part 2
7 lessons764- 01Command PatternChallengeQuiz
- 02Adapter PatternChallengeQuiz
- 03Decorator PatternChallengeQuiz
- 04Template Method PatternChallengeQuiz
- 05State PatternChallengeQuiz
- 06Composite PatternChallengeQuiz
- 07RAII as a PatternChallengeQuiz
Final Challenges
2 lessons2- 01E-Learning PlatformChallenge
- 02Banking SystemChallenge
C++ courses
Hands-on C++ courses, free to start in your browser.
Beginner Challenges - Practice Basic Concepts
PopularPut your beginner coding knowledge to test and try to solve this programming challenges, use any language you want, Happy Coding!
Certificate on completion
- 20
- 20
Coding Problems
PopularPut your programming problem solving skills to the test using the exercises with different difficulties in this course. Designed for coders with some prior knowledge of the basic syntax in any programming language.
Certificate on completion
- 32
- 31
Coding Problems: Volume 2
Put your programming problem solving skills to the test using the exercises with different difficulties in this course. Designed for coders with some prior knowledge of the basic syntax in any programming language. This course is an extension of the first Coding Problems
Certificate on completion
- 25
- 24
Stack - Data Structures Series #1
In this course, you will learn about the Stack data structure, create a Stack from zero using your preferred language, and practice coding challenges with it!
- 13
- 6
- 1
Recursion Challenges - Master The Recursive Thinking
Recursion is an important concept in computer science and a very powerful tool in writing algorithms. In this course, you will use recursion to solve challenges from beginner to advanced. In the end, you will ace this topic.
Certificate on completion
- 15
- 15
Star Pattern Bootcamp
Put your programming problem solving skills to learn how to print star patterns range from simple to complex, involving different levels of nested loops, conditional statements, and mathematical calculations.
- 30
- 28
Why learn C++ with Coddy
- Write and run real C++ code in your browser. No compiler install, no toolchain setup. Each lesson compiles your C++ server-side and shows the output instantly.
- Modern C++: classes and objects, inheritance, virtual functions, references and pointers, templates, the STL. The C++ patterns you'd actually use today.
- AI hints help you read and fix C++ compiler errors - notoriously cryptic ones especially - so the language feels approachable instead of punishing.
- Free C++ certificate when you finish. Useful for systems, game-dev, and embedded roles where C++ fluency is a baseline expectation.