資源簡介
代碼片段和文件信息
#include?
#include??
#include??
#include?
#include?
#include?
using?namespace?std;
string?filesave;
void?Move(string?sPath);?
void?GetLineAndPrint(string?in_name)
{
?ifstream?fin(in_name);
?ofstream?out(filesaveios::app);
?if?(!fin)
?{
?cerr?<“open?file?error“?<?exit(-1);
?}
?string?str;
?while?(getline(fin?str))
?{
????//cout?<????out< ?}
?fin.close();
}
bool?endswith(const?string&?str?const?string&?end)
{
????int?srclen?=?str.size();
????int?endlen?=?end.size();
????if(srclen?>=?endlen)
????{
????????string?temp?=?str.substr(srclen?-?endlen?endlen);
????????if(temp?==?end)
????????????return?true;
????}
????return?false;
}
int?main()
{
?struct?_finddata_t?fileinfo;
?string?in_path;
?string?in_name;
?system(“color?2e“);
?while(true)
?{
????cout?<“輸入文件夾路徑:“?;
????cin?>>?in_path;
????if(in_path==“quit“)break;
????filesa
- 上一篇:操作系統課程設計
- 下一篇:VC 多線程工具開源代碼
評論
共有 條評論