Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include <windows.h>
- #include <iostream>
- #include <fstream>
- #include <locale>
- #include <vector>
- using namespace std;
- #pragma comment(linker, "/STACK:16777216")
- int main()
- {
- SetConsoleCP(1251);
- SetConsoleOutputCP(1251);
- vector<string> vec;
- {
- ifstream f("create.txt");
- string line;
- while (std::getline(f, line))
- vec.push_back(line);
- }
- string* massiv = &vec[0];
- for (int i = 0; i < vec.size(); i++)
- {
- char charDelete[2048];
- strcpy_s(charDelete, massiv[i].c_str());
- remove(charDelete);
- if(i%500==0)
- cout << "Delete "<< i << " files" << endl;
- }
- cout << "Deleting " << vec.size() << " files" << endl;
- system("pause");
- return 0;
- }
Add Comment
Please, Sign In to add comment