title: error C2664: cannot convert parameter 1 from 'const std::basic_string<_Elem,_Traits,_Ax>' to 'std::wstring &
body: <pre><code>error C2664: 'CCertStoreHelper::DeleteCtl' : cannot convert parameter 1 from 'const std::basic_string&lt;_Elem,_Traits,_Ax&gt;' to 'std::wstring &amp;error C2664: 'CCertStoreHelper::DeleteCtl' : cannot convert parameter 1 from 'const std::basic_string&lt;_Elem,_Traits,_Ax&gt;' to 'std::wstring &amp;
  with
        [
                _Elem=wchar_t,
                _Traits=std::char_traits&lt;wchar_t&gt;,
                _Ax=std::allocator&lt;wchar_t&gt;
        ]
        Conversion loses qualifiers
  </code></pre>
  
  <p>I have no idea regarding this. So kindly provide the solution.</p>
  
  <p>Code:</p>
  
  <pre><code>CCertStoreHelper certCaStore;
  std::set&lt;std::wstring&gt; ctlIdentifiersToRemove; // It populates data which I m not mentioning
  
  
  std::set&lt;std::wstring&gt;::iterator iter1;
  std::set&lt;std::wstring&gt;::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 &amp;ctlIdentifier)
  </code></pre>
  
  <p>Kindly correct me what i am doing wrong
  Thanks</p>