Online tools
Web school
在线工具
基础教程
菜鸟教程
编程学习
Web 学校
❮
❯
HTML
CSS
JAVASCRIPT
SQL
PYTHON
JAVA
PHP
HOW TO
W3.CSS
C
C++
C#
BOOTSTRAP
REACT
MYSQL
JQUERY
EXCEL
XML
DJANGO
NUMPY
PANDAS
NODEJS
DSA
TYPESCRIPT
ANGULAR
ANGULARJS
GIT
POSTGRESQL
MONGODB
ASP
AI
R
GO
KOTLIN
SWIFT
SASS
VUE
GEN AI
SCIPY
AWS
CYBERSECURITY
DATA SCIENCE
INTRO TO PROGRAMMING
INTRO TO HTML & CSS
BASH
RUST
TOOLS
C++ Tutorial
C++ HOME
C++ Intro
C++ Get Started
C++ Syntax
Syntax
Statements
Code Challenge
C++ Output
Print Text
Print Numbers
New Lines
Code Challenge
C++ Comments
C++ Variables
Declare Variables
Multiple Variables
Identifiers
Constants
Real-Life Examples
Code Challenge
C++ User Input
C++ Data Types
Basic Data Types
Numbers
Booleans
Characters
Strings
The auto Keyword
Real-Life Example
Code Challenge
C++ Operators
Operators
Arithmetic
Assignment
Comparison
Logical
Precedence
Code Challenge
C++ Strings
Strings Intro
Concatenation
Numbers and Strings
String Length
Access Strings
Special Characters
User Input Strings
Omitting Namespace
C-Style Strings
Code Challenge
C++ Math
C++ Booleans
Boolean Values
Boolean Expressions
Real-Life Example
Code Challenge
C++ If...Else
if
else
else if
Short hand if..else
Nested if
Logical Operators
Real-Life Examples
Code Challenge
C++ Switch
Switch
Code Challenge
C++ While Loop
While Loop
Do/While Loop
Real-Life Examples
Code Challenge
C++ For Loop
For Loop
Nested Loops
The foreach Loop
Real-Life Examples
Code Challenge
C++ Break/Continue
C++ Arrays
Arrays
Arrays and Loops
Omit Array Size
Get Array Size
Real-Life Example
Multidimensional Arrays
Code Challenge
C++ Structures
C++ Enums
C++ References
Create References
Memory Address
C++ Pointers
Create Pointers
Dereferencing
Modify Pointers
C++ Memory Mgmt
Memory Management
new and delete
C++ Functions
C++ Functions
C++ Function Parameters
Parameters/Arguments
Default Parameter
Multiple Parameters
Return Values
Pass By Reference
Pass Arrays
Pass Structures
Real-Life Example
C++ Function Overloading
C++ Scope
C++ Recursion
C++ Lambda
C++ Classes
C++ OOP
C++ Classes/Objects
C++ Class Methods
C++ Constructors
Constructors
Constructor Overloading
C++ Access Specifiers
C++ Encapsulation
C++ Friend Functions
C++ Inheritance
Inheritance
Multilevel Inheritance
Multiple Inheritance
Access Specifiers
C++ Polymorphism
Polymorphism
Virtual Functions
C++ Templates
C++ Files
C++ Date
C++ Errors
C++ Errors
C++ Debugging
C++ Exceptions
C++ Input Validation
C++ Data Structures
C++ Data Structures & STL
C++ Vectors
C++ List
C++ Stacks
C++ Queues
C++ Deque
C++ Sets
C++ Maps
C++ Iterators
C++ Algorithms
C++ Namespaces
C++ Namespaces
C++ Projects
C++ Projects
C++ Cert
C++ Certificate
C++ How To
C++ Add Two Numbers
C++ Random Numbers
C++ Reference
C++ Reference
C++ Keywords
C++ <iostream>
C++ <fstream>
C++ <cmath>
C++ <string>
C++ <cstring>
C++ <ctime>
C++ <vector>
C++ <algorithm>
C++ Examples
C++ Examples
C++ Real-Life Examples
C++ Compiler
C++ Exercises
C++ Quiz
C++ Code Challenges
C++ Practice Problems
C++ Syllabus
C++ Study Plan
C++ Examples
❮ Previous
Next ❯
C++ Syntax
Create a simple "Hello World" program
Syntax Explained
C++ Output/Print
Use cout to output values/print text
Using many cout objects
Insert a new line with \n
Insert a new line with endl
Output Explained
C++ Comments
Single-line comment before a line of code
Single-line comment at the end of a line of code
Multi-line comment
Comments Explained
C++ Variables
Create an integer variable
Create a variable without assigning the value, and assign the value later
Assign a new value to an existing value (this will overwrite the previous value)
Create an unchangeable variable with the const keyword
Combine text and a variable on print
Add a variable to another variable
Declare many variables of the same type with a comma-separated list
Identifiers
Variables Explained
C++ User Input
Input a number and print the result
Input two numbers and print the sum
User Input Explained
C++ Data Types
A demonstration of different data types
Create an int type
Create a float type
Create a double type
Create boolean types
Create a char type
Create a string type
Data Types Explained
C++ Operators
Addition operator
Increment operator
Assignment operator
Addition assignment operator
Operators Explained
C++ Strings
Create a string
String concatenation
String length
Access string characters
Change string characters
User input strings
Strings Explained
C++ Math
Find the highest value of two numbers
Find the lowest value of two numbers
Use the cmath header file for other math functions
Math Explained
C++ Booleans
Boolean values
Compare two values
Compare two variables
Booleans Explained
C++ If...Else (Conditions)
The if statement
The else statement
The else if statement
If...Else Explained
C++ Switch
The switch statement
The switch statement with a default keyword
Switch Explained
C++ Loops
While loop
Do while loop
For loop
Break a loop
Continue a loop
Loops Explained
C++ Arrays
Create and access an array
Change an array element
Loop through an array
Get the size/length of an array
Multidimensional arrays
Arrays Explained
C++ References
Create a reference variable
Access the memory address of a variable
References Explained
C++ Pointers
Create a pointer variable
Get the value of a variable with the dereference operator *
Modify the pointer value
Pointers Explained
C++ Files
Create, write and read a text file
Files Explained
C++ Functions
Create and call a function
Call a function multiple times
Function declaration and definition
Parameters and arguments
Default parameter value
Multiple parameters
Return value
Return the sum of two parameters
Pass by reference
Pass an array to a function
Function overloading
Functions Explained
C++ Classes/Objects
Create an object of a class and access class attributes
Create multiple objects
Create class methods
Define a class method outside the class definition
Add parameters to a class method
Create a constructor
Constructor parameters
Constructor defined outside the class
Public and private specifiers
Encapsulation - hide sensitive data from users
Inheritance - inherit attributes and methods from one class to another
Multilevel inheritance
Multiple inheritance
Polymorphism - perform a single action in different ways
Files - Create, write and read a file
Exceptions - Handle errors
Classes/Objects Explained
❮ Previous
Next ❯
★ +1
Sign in to track progress
COLOR PICKER
REMOVE ADS
-->