I need to define a variable with 2 decimals to make a simple division.
Ej
float x;
x=1/2
When I execute X has the following value: 0.0000000
I need X has 0.5
What is my error?
Thanks.
PD: I just start to program C++ using Visual Studio 2010 c++
|
Results 1 to 3 of 3
Thread: C++ Define FLOAT variableThreaded View
|
Click Here to Expand Forum to Full Width |