%lf is not working in Viesul studio 13 and VisualGDB Ultimate Edition

18 Views Asked by At

A problem occurred while using %lf in sprintf.

char ary[20];
double d = 0.1235f;
sprintf(ary, "%lf", d);

d : 0.12349999696016312

[result]

ary : ""

I can't find the reason why.

0

There are 0 best solutions below