Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- #include <vector>
- #include <string>
- using namespace std;
- const string input = "Client.txt";
- const string output = "logs.txt";
- int main()
- {
- ifstream In;
- ofstream Out;
- string line = "";
- unsigned int n = 0, n2 = 0;
- In.open(input.c_str());
- Out.open(output.c_str());
- if (In.fail())
- {
- return 0;
- }
- else
- {
- while (!In.eof())
- {
- getline(In, line);
- if (line.find("Player died,") != -1)
- {
- int n = line.find("Player died,");
- line.erase(0, n - 1);
- Out << line << "\n";
- }
- }
- }
- In.close();
- Out.close();
- cin.get();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement