Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
438 B
0
Indexable
Never
#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <fstream>
using namespace std;
bool www(string a, string b) {
	return a.length() > b.length();
}
int main()
{
	int i=0;
	string d;
	vector <string> a;
	ifstream s("txt.txt");
	for (int i = 0; s >> d; i++)
	{
		a.push_back(d);
	}
	sort(a.begin(), a.end(), www);
	for (int i = 0; i < a.size(); i++)
	{
		cout << a[i] << "\n";
	}
}