Part 18 - Double Primitive Datatype
For a complete table of contents of all the lessons please click below as it will give you a brief of each lesson in addition to the topics it will cover. https://github.com/mytechnotalent/hacking\_c-\_arm64
Today we are going to talk about the C++ double datatype that stores double floating point values.
#include <iostream>
int main()
{
double my_double = 10.1;
std::cout << my_double << std::endl;
return 0;
}
Very simply we create a float and assign a simple value to it and print it.
Let’s compile and link.
g++ -o 0x06_double_primitive_datatype 0x05_double_primitive_datatype.cpp
Let’s run.
./0x06_double_primitive_datatype
We simply see the following.
10.1
It successfully echoed 10.1 to the terminal stdout. Very simple.
Next week we will debug this very simple example.
当前内容版权归 mytechnotalent 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 mytechnotalent .