Skip to main content
pelatihan
.org
Learn. Practice. Grow.
Category
EN
Sign in
Sign up
Menu
C++ Curriculum: 10 Chapters, 64 Lessons — pelatihan.org
Home
/
Catalog
/
C++
/
Curriculum
Curriculum
C++ Curriculum
Learn C++ online with 64 structured lessons, code examples, and 320 quiz questions.
64 lessons
10 chapters
320 questions
Summaries and key points are free to preview. Full lessons, code examples, and quizzes require a subscription.
01
C++ Tutorial
24 lessons
01
C++ HOME
This lesson is the entrance to C++ tutorials and provides an overview of the language developed by Bjarne Stroustrup as an extension of C. C++ is known as a compiled language…
02
C++ Intro
This lesson introduces you to the history, philosophy, and characteristics of C++ before you write the first code. C++ was born from the need for a C language that has…
03
C++ Get Started
This lesson guides you from writing the first code to running it on a computer. The process is simple: write code to the editor, save it with the .cpp extension, then compile…
04
C++ Syntax
This lesson explains the rules of C++ code writing that must be followed for a program to be compiled. You'll learn about the structure of the block code with curly braces, the…
05
C++ Output
This lesson discusses how to display output to the screen using the object cout from the iostream header. You learn to compile multiple output parts into one command line and use…
06
C++ Comments
This lesson explains how to add comments to C++ code to make the program easier to understand. C++ provides one-line comments with // and block comments with /*... */. Commentary…
07
C++ Variables
This lesson discusses variables as the data naming containers in memory. You learn how to declare variables with the right kind of data, give them a starting value, and change…
08
C++ User Input
This lesson teaches you how to make a program receive data from a user via a keyboard. The ring object of the iostream header is used along with the operator >> to read values…
09
C++ Data Types
This lesson describes the types of data available in C++, which are specifications that determine the type and size of data that can be stored in a variable. Choosing the right…
10
C++ Operators
This lesson discusses operators in C++, which are symbols that manipulate operand values such as arithmetic, comparison, and logic. You'll learn the operator's rule of priority…
11
C++ Strings
This lesson discusses the handling of text in C++ through the class std::string of the header string. You learn to make strings, combine them, and figure out the length and…
12
C++ Math
This lesson introduces a C++ built-in mathematics library that makes numerical calculations easier. With the header, you can use functions like sqrt, pow, abs, ceil, and floor…
13
C++ Booleans
This lesson discusses the boolean data type that only stores true or false values. The Boolean becomes the basis of all branching conditions and statements in a program, because…
14
C++ If...Else
This lesson discusses branching if, else if, and else to make the program make decisions based on specific conditions. If the condition is worth true then the if block is…
15
C++ Switch
This lesson explains the switch statement as a branching alternative when comparing one variable with many constant values. Every possibility is written in a case, and default is…
16
C++ While Loop
This lesson discusses the repetition while that executes a block of code during a value condition. It is suitable for use when the number of repetitions is not known at the…
17
C++ For Loop
This lesson discusses the most commonly used iterations of for when the number of iterations is already known at the beginning. Structure for combines the initialization of…
18
C++ Break/Continue
This lesson explains the two keywords of the repeat loop controller, break and continue. break stops the repeat or switch earlier, while continue jumps through the rest of the…
19
C++ Arrays
This lesson discusses arrays, which are a collection of elements of the same type that are stored sequentially in memory and accessed through an index. Arrays make it easy to…
20
C++ Structures
This lesson discusses struct, a custom data type that combines several variables of different types in one container. With struct, interrelated data like names, ages, and values…
21
C++ Enums
This lesson discusses enumeration, which is how to define a set of named constants that makes code more readable. For example, status or days of the week are more clearly written…
22
C++ References
This lesson is about references, which are aliases or other names for a variable that shares the same memory. Reference must be initialized when created and cannot be redirected…
23
C++ Pointers
This lesson is about pointers, which are special variables that store memory addresses from other variables. With the operator & you take the address, and with the operator * you…
24
C++ Memory Mgmt
This lesson explains memory management in C++, distinguishing automatic allocation on stacks from manual allocation on heaps. The keyword new is used to make objects in heap,…
02
C++ Functions
6 lessons
01
C++ Functions
This lesson discusses functions as a named code block that can be called over and over as needed. Using the functionality makes the program more orderly, reduces code repetition,…
02
C++ Function Parameters
This lesson explains how to pass data to functions through parameters and arguments. The parameter is the receiver on the declaration side, whereas the argument is the actual…
03
C++ Function Overloading
This lesson discusses overloading, which is the ability to define several functions with the same name but different lists of parameters. The compiler will select the most…
04
C++ Scope
This lesson explains scope, the area where a variable name or function can be accessed. Local variables only live within the block where they are declared, whereas global…
05
C++ Recursion
This lesson discusses recursion, a technique where a function calls itself to break up a problem into smaller cases. Every recursive call must have a stop condition (base case)…
06
C++ Lambda
This lesson discusses lambda expression, an anonymous function that can be defined directly within an expression without the need for a separate declaration. Lambda is very…
03
C++ Classes
12 lessons
01
C++ OOP
This lesson introduces Object-Oriented Programming (OOP), a paradigm that models programs as a collection of interacting objects. C++ supports the main pillars of OOP:…
02
C++ Classes/Objects
This lesson discusses class and object as the core of OOP application in C++. A class is a blueprint that defines an attribute (data) and a method (behavior), whereas an object…
03
C++ Class Methods
A method is a function that lives within a class and performs a task related to that object's data. Method can be written directly within a class or declared in a class and then…
04
C++ Constructors
A constructor is a special function that is automatically executed whenever an object is created, usually to fill in the initial data. C++ supports built-in constructors,…
05
C++ Access Specifiers
Access specifiers set how far a class member can be accessed from another part of the program. C++ has three specifications: public, private, and protected. In a class, members…
06
C++ Encapsulation
Encapsulation is an OOP principle that combines data with the method that manages it, while hiding internal details behind private access. Class users use public methods like…
07
C++ Friend Functions
Friend is a non-member function that is specifically authorized to access private members of a class. Permission is given with the keyword friend in the class, and the function…
08
C++ Inheritance
Inheritance makes a new class (derived) able to reuse another class (base) so that code is not duplicated. The derivative class automatically gets the public method and…
09
C++ Polymorphism
Polymorphism allows one interface to be used for many forms: methods with the same name can behave differently on a derivative class. The key is virtual function, which makes the…
10
C++ Templates
Templates allow us to write a single piece of generic code that works for many types of data. C++ has a template for versatile functions such as max or swap, as well as a class…
11
C++ Files
C++ can read and write text files using stream objects from the header <fstream>: ofstream for writing, ifstream for reading, and fstream for both. The workflow always opens the…
12
C++ Date
C++ works with time through the time_t type of the <ctime> header, which stores the number of seconds since epoch (January 1, 1970). The time(nullptr) function takes the current…
04
C++ Errors
4 lessons
01
C++ Errors
There are basically three types of program errors: syntax errors that make compilation fail, runtime errors that occur when a program is running, and logic errors that make the…
02
C++ Debugging
Debugging is the process of finding and fixing bugs, from reading compiler messages, printing values with cout, to using a debugger with breakpoint and watch variable. A common…
03
C++ Exceptions
Exception handling separates the code that can fail from the code that handles the failure, using the try block to try, throw to throw the problem, and catch to handle it. With…
04
C++ Input Validation
Input validation ensures that the data entered by the user is in line with the program's expectations, such as numbers that are actually numbers and are within a reasonable…
05
C++ Data Structures
10 lessons
01
C++ Data Structures & STL
Data structures are a way of organizing data in memory for easy access and processing, from simple structures to dynamic collections. C++ provides a Standard Template Library…
02
C++ Vectors
Vectors are dynamic containers that store sequential elements in memory, such as arrays but can increase in size as the program runs. We can add with push_back(), delete with…
03
C++ List
Std::list is a sequential container based on a doubly linked list, so that each element stores a pointer to the element before and after it. Consequently, insertion and deletion…
04
C++ Stacks
A stack is a container with the LIFO principle (last in, first out): the last element that enters is the first to leave. The operation is very limited and simple, i.e. push to…
05
C++ Queues
Queues are containers with the FIFO principle (first in, first out): the first element that enters is the first to be served. New elements are always added on the back with…
06
C++ Deque
Std::deque (double-ended queue) is a container that holds consecutive elements and allows addition and deletion at both ends at once. Unlike vectors that are only convenient at…
07
C++ Sets
Std::set is a container that only stores unique elements and always sort them automatically based on values, even though our order of insertion is random. Because the structure…
08
C++ Maps
Std::map stores key-value pairs sorted by key, so that each key is unique and can be searched quickly. The value is taken with the operator [] or at(), and a new key is…
09
C++ Iterators
An iterator is a pointer object that runs along the container element, so the algorithm can work regardless of the type of container. A common iterator is provided in pairs…
10
C++ Algorithms
Header <algorithm> contains a set of ready-to-use functions for processing data in containers, such as sort, find, count, reverse, and for_each. Most algorithms work with an…
06
C++ Namespaces
1 lessons
01
C++ Namespaces
Namespace is a logical container that groups names such as functions, classes, and variables so as not to clash between program parts. The term std is the C++ built-in namespace…
07
C++ Projects
1 lessons
01
C++ Projects
Real C++ projects rarely contain a single large file; typically the code is separated into a header (.h/.hpp) for declarations and a source file (.cpp) for implementation.…
08
C++ How To
2 lessons
01
C++ Add Two Numbers
Adding two numbers together is the first exercise to understand the data stream in C++: read input with a ring, save it to a variable, count it, and then perform it with a cout.…
02
C++ Random Numbers
C++ provides rand() of <cstdlib> to generate random numbers, but the result is only variable if the seed is started with srand(time(0)). Common formulas such as rand() % 6 + 1…
09
C++ Examples
4 lessons
01
C++ Examples
The sample-supply page shows how the basic C++ syntax is combined into small programs that actually work, like calculators, odd-determiners, factor counters, and text inverters.…
02
C++ Real-Life Examples
Real-life examples such as ATM machines, school scores, or catalogs of items show that C++ programs are built on learned concepts: struct/class for data, vectors for data sets,…
03
C++ Syllabus
Syllabus is a design of material that shows the learning sequence of C++ from basic to proficient, so we know what we've mastered and what's next. The logical flow starts with…
04
C++ Study Plan
A study plan is a structured learning schedule that breaks down C++ material into realistic daily or weekly targets, complete with practice and evaluation time. The key to…