Variables in C++

Learn how to declare and initialize variables in C++.

Variable declaration #

A variable declaration means that we want the compiler to reserve a space for a data with the given name and type.

The basic syntax for declaring a variable in C++ is: