0
Is there a function that return a decimal point value from a double/float ?
Maybe there's a function that I don't know, that works a little bit like this: double x = 699.25; int n = getPoint(x); std::cout << n; //outputs 25 You get the point. Is there a function, or a way I can do that? Thanks in advance!
3 Antworten
+ 2
double x=22.336;
int y=(int)x;
double d=(int)((x-y)*1000);
this should work
+ 1
Thanks for the answer!