【发布时间】:2020-05-11 05:13:17
【问题描述】:
错误 C2668: 'std::basic_string
,std::allocator<:wchar_t>>::find_first_not_of' : 对重载函数的模糊调用
我在 Visual Studio 2013 中收到此错误,但在 MinGW 中没有。我可以用这个做什么?
我尝试添加cache.std::wstring::find_first_not_of,但这没有帮助。
我的代码:
wstring cache = key.GetExpandStringValue(L"Path");
int empregnul = 0;
if(cache.find_first_not_of('\0') == wstring::npos)
{
empregnul = 1;
}
【问题讨论】:
-
试试
L'\0'.... -
谢谢,
L帮助了我。 -
@Debugger55 — 你明白为什么吗?
标签: c++ visual-studio visual-c++ visual-studio-2013