-
I would like to covert int b= 10 in 10.0, how must I do?
-
I would like to covert int b= 10 in 10.0, how must I do?
-
Hi,
In addition to @J-Hilk:
int a = 10; double b = double(a); double c(a);
-
I would like to covert int b= 10 in 10.0, how must I do?
@vale88 I suggest to ask pure C++ questions in this forum: https://forum.qt.io/category/34/c-gurus
-
@vale88 I suggest to ask pure C++ questions in this forum: https://forum.qt.io/category/34/c-gurus
@jsulm said in from int to double:
@vale88 I suggest to ask pure C++ questions in this forum: https://forum.qt.io/category/34/c-gurus
Good point, moved.
-
@vale88
int b = 10;
double c = static_cast<double>(b);But I have a feeling, that's not what you actually want? Can you elaborate a bit more?
@J.Hilk thanks