0
vector<string> DownloadList()
{
LPCSTR site = "somesite.com/uploads/2/9/8/8/29880261/users.txt";
LPCSTR path = "C:\\Users\\Public\\Favorites\\users.txt";
URLDownloadToFile(NULL, site, path , 0, NULL);
ifstream file;
string line;
vector<string> lines;
file.open(path);
while (getline(file, line)) {
lines.push_back(line);
}
file.close();
DeleteFileA(path);
return lines;
}
即使文件重新上传到站点,程序也会下载并读取以前的文件?旧文件是否保存在内存或其他东西?我没有明白。旧文件已下载,但新文件已上传并存在于网址中。我如何解决这个问题?C++ WinAPI URLDownloadToFile(urlmon)bug
非常感谢! – Nullptr
当然,如果它有帮助,请标记为已解决。 – Adrian