I have a data structure that looks like this.
I was wondering how I could sort the vector<Election::Candidate*>* myCandidates by their total votes. How would I go about doing this.Code:struct Election{
struct Candidate{
vector<int*>* myPrecincts;
string* myName;
int* myTotalNumberOfVotes;
};
vector<Election::Candidate*>* myCandidates;
string* myName;
int* myTotalNumberOfVotes;
};
vector<Election*>* myElections;