In this tutorial is explained how to use C++ variables and datatypes for beginners to programming.

It is perhaps not the most interesting part of learning C++ but it is basic stuff, very essential.

The basic data types in C++ are:

  • bool : true or false (1 bit)
  • char : Character 1 bit
  • int16_t : 16 bit integer
  • int32_t : 32 bit integer
  • int64_t : 64 bit integer
  • float : Floating-point
  • double : Double precision floating point
  • string : Text (from the STL library)

I recommend to follow along the simple example of the tutorial with Visual Studio 2019 to understand how to get started with these types in a simple console application.

(Visited 21 times, 1 visits today)