//filePath:存放所有文件名的txt,文件名之间用回车
//fileList:文件夹中所有文件名存放的位置
//算法:用到ifstream
//用途:读取txt中所有文件名,将文件名存入fileList中
void getFilesName(const char *filePath, vector<string> &fileList)
{
    ifstream file;
    file.open(filePath, ios::in);
    std::string strLine;
    while (getline(file, strLine))
    {
        if (strLine.empty())
            continue;
        fileList.push_back(strLine);
  

相关文章:

  • 2021-09-05
  • 2022-12-23
  • 2021-05-25
猜你喜欢
  • 2022-12-23
  • 2021-05-27
  • 2022-12-23
  • 2022-12-23
  • 2021-07-13
  • 2022-12-23
  • 2021-09-10
相关资源
相似解决方案