Code it ALL
C++ Variables - CodeGK
♦ C++ Variables

♣ About C++ Variables

Variables are Dummy data types which hold the value of Actual Data Types.
Variables are not compulsory for writing programs, but they come extremely handy for organization and generalization of code.

♣ Local Variable in C++

A variable defined in particular scope can be only accessed in that part of the code block, such variables are called Local Variables.
For Example, the variables defined inside the function can only be accessed from internal code block of function.

♣ Global Variable in C++

A type of variable that can be accessed from any part of the code is called a global variable(of course, the accessing should be from below of the definition of the variable). For example, a variable which is initialized globally(outside of all functions and outside of all classes) can be accessed from anywhere(inside/outside of functions/classes).