从txt中读取文件

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_25254777/article/details/80429546
#include <fstream>
//static bool readStringList(const string& filename, vector<string>& l)
//{
//  l.resize(0);
//  ifstream myfile(filename);
//  string temp;
//  if (!myfile.is_open())
//  {
//      cout << "未成功打开文件" << endl;
//  }
//  while (getline(myfile, temp))
//          {
//      l.push_back(string(temp));
//              
//              /*outfile << endl;*/
//          } 
//      myfile.close();
//          
//
//
//  return true;
//}

猜你喜欢

转载自blog.csdn.net/qq_25254777/article/details/80429546