使用C ++将DWORD转换为字符串

时间:2019-11-04 01:03:50

标签: c++

我使用GetVolumeInformation命令获得了IDmachine。我想将idmachine(DWORD)更改为字符串,然后在TEdit(C ++ builder)中显示,但不显示。请帮帮我!

GetVolumeInformation(L"C:\\",NULL,NULL,&dwVolSerial,NULL,NULL,NULL,NULL);
std::wstring wstr = std::to_wstring(idmachine);
std::string str = std::string(wstr.begin(), wstr.end());
ShowMessage(str);

错误 Vcl.Dialogs.hpp(1430):候选函数不可行:第一个参数没有从'std :: string'(aka'basic_string,allocator>')到'const System :: UnicodeString'的已知转换

0 个答案:

没有答案