C++ - float and double values

Опубликовано: 19 Октябрь 2024
на канале: McProgramming
42,664
192

How do you store decimal values or real numbers in C++? With float and double type variables. We will focus on float and the only difference between float and double is that double is 64 bit and float is 32 bit. They do the same thing except for double holds twice the amount of bytes. It is up to programmer as to what they want to declare their variables. I also show you how to cast an int to a float (aka floating point value) in C++.

http://www.mcprogramming.org
http://www.essentialcscourses.com