error C2664: 'CCertStoreHelper::DeleteCtl' : cannot convert parameter 1 from 'const std::basic_string<_Elem,_Traits,_Ax>' to 'std::wstring &error C2664: 'CCertStoreHelper::DeleteCtl' : cannot convert parameter 1 from 'const std::basic_string<_Elem,_Traits,_Ax>' to 'std::wstring &
with
[
_Elem=wchar_t,
_Traits=std::char_traits<wchar_t>,
_Ax=std::allocator<wchar_t>
]
Conversion loses qualifiers
我对此一无所知。所以请提供解决方案。
代码:
CCertStoreHelper certCaStore;
std::set<std::wstring> ctlIdentifiersToRemove; // It populates data which I m not mentioning
std::set<std::wstring>::iterator iter1;
std::set<std::wstring>::iterator iter2;
for(iter1 = ctlIdentifiersToRemove.begin(); iter1 != ctlIdentifiersToRemove.end(); iter1++)
{
iter2 = ctlIdentifiersReferenced.find((*iter1));
if(iter2 == ctlIdentifiersReferenced.end())
{
if(certCaStore.DeleteCtl((*iter1))) // error line
{
// ...
}
}
}
// prototype for DeleteCtl fun is
bool CCertStoreHelper::DeleteCtl(std::wstring &ctlIdentifier)
请纠正我做错了什么谢谢