STL set< ScoreTable > zobacz czy Ci odpowiada. Zobacz czy oto Ci chodzi http://www.cplusplus.com/reference/set/set/rbegin/
tylko będziesz musiał przeciążyć operator < lub >, ale chyba ten pierwszy i to musisz zrobić w Twojej klasie, lub funkcję przeciążenia operatora zaprzyjaźnić z Twoją klasą.
lub też STL vector< ScoreTable> i tak z operatorem jak chcesz mieć takie samie wyniki i imona
lub też bez przeciązenia
class Record {
private:
string name;
int score;
public:
Record(string, int); //constr
};
Record::Record(string name = "Player", int score = 0)
{
this->name = name;
this->score = score;
this -> temp = to_string (this->score)+"ala ma kota"+ "this->name" wyniki.push_back.(std::move(temp)); // ale za to move to podziękuj J23
}
}
......
//globalna definicja
std::vector<string>wyniki; //globalna definicja przed klasą Record
int main(){}
no i posortuj ten wektor i wyświetl od tyłu bo chyba o to chodzi?
lub lepiej w destruktorze
class Record {
....
~Record(){
this -> temp = to_string (this->score)+"ala ma kota"+ "this->name" wyniki.push_back.(std::move(temp));
}