Greetings, folks!
In this post I’m going to tell you which are the basic types of data in C++, in a simple way, I do not want to be confusing and ruin anyone’s life.

In C++, a data type refer to the system used for declaring variables or functions. The most simple way to explain it: every type of variable have a different storage occupied, and also the interpretation of the bit pattern change in every data type.

The most common types are “int”, “float” and “char”.

Let’s explain it quickly and simple as possible, because this is just and introduction to this topic:

Int refers to integer number values, the storage for this type is 4 bytes.
Float is for floating numbers values, you know, number values with points, like 3.1416 or 1.7071, the storage occupied for this data type is 4 bytes.
Char is for characters arrays, this means that you can call a char variable declared as a word or phrase.. The storage is 1 byte.

In order to make this more explainable, here you have an example:

datatypes

Any questions must be asked, so I beg you to ask every single doubt about this. Have a nice day.

To more information and charts about this, check out this: http://www.tutorialspoint.com/cprogramming/c_data_types.htm
The program I used for the example is over here: https://github.com/hrglez/TC1017/blob/master/DataTypes

CC BY 4.0 Basic data types in C++ by hrglez is licensed under a Creative Commons Attribution 4.0 International License.