我已声明Wstring
如下
wstring strID
当我尝试查找出现的子字符串时,如下所示
int index = strID.find("LABS");
我收到如下错误
error C2664: 'unsigned int std::basic_string<_Elem,_Traits,_Ax>::find(const std::basic_string<_Elem,_Traits,_Ax> &,unsigned int) const' : cannot convert parameter 1 from 'const char [13]' to 'const std::basic_string<_Elem,_Traits,_Ax> &'
你能帮我找到子字符串的出现次数吗?
搜索 wstring 时,您还需要将参数设置为宽字符串
int index = strID.find(L"LABS");
^
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)