Witam!
mam problem z listą vector, jest to ostatnia rzecz, którą muszę zrobić do projektu.
class Result
{
int point;
std::string name;
public:
Result(int P, std::string S): point (P), name(S)
{};
};
int main()
{
std::vector<Result> result;
std::fstream we;
int point=0;
std::string stryng;
we.open("Result.txt", std::ios::in);
while (we>>point>>stryng)
{
result.push_back(Result(point,stryng));
}
}
Mam taki kod. muszę ten cały złom posortować biorąc pod uwagę point z klasy result i to względej tej zmiennej będzie całe sortowanie. Jak to dalej ruszyć?