void setPrecision_float2wstring(wstring& s,int precision)//precision n.精度
{
int pos=s.find(L".",sizeof(wchar_t));//得到小数点的索引,从零开始
int i = s.length() - 1 - pos - precision;//i确定pop的次数
while (i--)
s.pop_back();
}
to_string同理
void setPrecision_float2wstring(wstring& s,int precision)//precision n.精度
{
int pos=s.find(L".",sizeof(wchar_t));//得到小数点的索引,从零开始
int i = s.length() - 1 - pos - precision;//i确定pop的次数
while (i--)
s.pop_back();
}
to_string同理