title: std::replace gives error
body: <p>I am trying to convert a file path which just have one slash to double slash as shown on the code below.
  but it gives me the error shown at the end</p>
  
  <pre><code>    #include&lt;algorithm&gt;
  
      std::string file_path;
      using std::replace;
       while(fgets(fname_buffer,1024,flist))
     {
      token = strtok( fname_buffer," ,\t");
      file_size=atol(token);
  
      token = strtok(NULL, " ,\t"); 
     strncpy((char*)file_fp,token,32);
     file_fp[32]='\0';
  
      token = strtok(NULL, "\n");
      file_path=token;
      replace(file_path.begin(),file_path.end(),'\\',"\\\\");
      //file_path.replace(file_path.begin(),file_path.end(),'\\','\\\\');
  </code></pre>
  
  <blockquote>
    <p>error C2664: 'std::basic_string&lt;_Elem,_Traits,_Ax> &amp;std::basic_string&lt;_Elem,_Traits,_Ax>::replace(unsigned int,unsigned int,const _Elem *,unsigned int)' : cannot convert parameter 1 from 'std::_String_iterator&lt;_Elem,_Traits,_Alloc>' to 'unsigned int'</p>
  </blockquote>