Cae*_*sar 2 c++ std tostring visual-studio-2010 c++11
#include <string>
int main()
{
double randDouble = 1245.432;
std::wstring stringDouble = std::to_wstring(randDouble);
}
Run Code Online (Sandbox Code Playgroud)
当我在Visual Studio 2010中编译它时,我收到此错误
错误1错误C2668:'std :: to_wstring':对重载函数6的模糊调用
1>错误C2668:'std :: to_string':对重载函数的模糊调用
1> d:\ program files(x86)\ microsoft visual studio 10.0\vc\include\string(688):可能是'std :: string std :: to_string(long double)'
1> d:\ program files(x86)\ microsoft visual studio 10.0\vc\include\string(680):或'std :: string std :: to_string(_ULonglong)'
1> d:\ program files(x86)\ microsoft visual studio 10.0\vc\include\string(672):或
'std :: string std :: to_string(_Longlong)'
有人可以向我解释为什么编译器会混淆我做错了什么?
| 归档时间: |
|
| 查看次数: |
1657 次 |
| 最近记录: |