其实就是读入字符串和读取的问题吧
写入字符串
fstream temptfile;
temptfile.open(".\\confile.txt",ios::out);
temptfile.write("代入描述路径的字符串",strlen("代入描述路径的字符串"));
temptfile.write("\n",1);
从txt读取
fstream temptfile;char tmpchr[]="";
temptfile.open(".\\confile.txt",ios::in);
temptfile.getline(tmpchr,15,'\n');