Сообщество IT-специалистов
Ответы на любые вопросы об IT
Профессиональное развитие в IT
Удаленная работа для IT-специалистов
struct Type { std::string filename; float length; }; std::vector<Type> *vector2 = new std::vector<Type>();
std::sort(vector2->begin(), vector2->end(), [](const Type& a, const Type& b) {return a.length > b.length; });
что в третьем параметре
vector <int> a; for(int i=0; i < a.size(); i++) { for(int j=0; j < a.size();i++) { if(a[j] > a[j+1]) { swap(a[j], a[j+1]); } } }