Untitled
unknown
plain_text
3 years ago
406 B
6
Indexable
#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--;
}
}
Editor is loading...