Я пытаюсь преобразовать путь к файлу, в котором есть только одна косая черта, в двойную косую черту, как показано в приведенном ниже коде. но это дает мне ошибку, показанную в конце
#include<algorithm>
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(),'\\','\\\\');
ошибка C2664: 'std :: basic_string ‹_Elem, _Traits, _Ax> & std :: basic_string‹ _Elem, _Traits, _Ax> :: replace (unsigned int, unsigned int, const _Elem *, unsigned int)': невозможно преобразовать параметр 1 из 'std :: _ String_iterator ‹_Elem, _Traits, _Alloc>' на 'unsigned int'