void bot_manager_item::create_games()
{
games.clear();
std::ifstream paths_in("C:\\Users\\bill hank\\Documents\\bot_plugins\\directory_listing.txt", std::ios::in);
while (paths_in.good())
{
send_message("The path was good.");
char q[5000];
paths_in.getline(q, 5000);
send_message(q);
games.push_back(qanda(q));
}
paths_in.close();
}
我正在加载的文件存在,还有什么问题?paths_in.good 一直失败。
编辑:我想通了。哇,我对这个答案感到恼火。基本上,Windows 让您说出是否要显示文件扩展名。此 Windows 安装设置为不应显示扩展名。因此,当我一次又一次地检查文件时,我看到: directory.txt 并认为这意味着目录的一切都很好,而实际上文件名是 directory.txt.txt