Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
406 B
0
Indexable
Never
#include <string>
#include <fstream>
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main()
{
	ifstream in("test.txt");
	ofstream out("griq.txt");
	vector<string> list;
	string p;
	while (getline(in, p))
	{
		list.push_back(p);
	}
	sort(list.begin(), list.end());
	int i = list.size()-1;
	while (i > -1)
	{
		cout << list[i] << endl;
		i--;
	}
}