Check out example codes for "int to float c++". It will help you in understanding the concepts better.

Code Example 1

int a = 3;
float b = (float)a;

Code Example 2

double x;
x = (double) 25;

Learn ReactJs, React Native from akashmittal.com