char str[16]; float f = 123.456789; snprintf(str, sizeof(str), "%.2f", f);. This will give you a C string with two decimal places. And that's ...
確定! 回上一頁