在编译时,我没有在此范围内声明“ getline”
编译下一个代码:
string PostCmd::getFailedFromFile()
{
string failedList;
ifstream file(FILE, ifstream::in);
if (file.is_open())
{
getline(file, failedList);
file.close();
}
else
{
cout << "Unable to open file";
}
return failedList;
}
答案 0 :(得分:0)