Trying to get this sort function to work. How can I change the int in the array to something that will work. Do I just need to declare “mark” and “place” as something different?

void sortFunction (string stringArr[], int arrScore, int inputNumberofScores)
{
    string tempName;
    string tempScore;
    
    
    int mark = 1; //Mark is our main place of where we are in the list that we are trying to replace.
    
    for (mark = 1; mark < inputNumberofScores; mark++);
    {
        int place = 0; //place is our current "candidate" to possibily replace "mark".
        
        for (place = mark; place <=inputNumberofScores; place++);
        {
            
            if (arrScore[place] < arrScore[mark]){
                tempName = stringArr[place];
                tempScore = arrScore[place];
                
                stringArr[place] = stringArr[mark];
                arrScore[place] = arrScore[mark];
            }
        }
    }
}

Sort function that takes a list of Student Names and Scores and sorts it from lowest score to highest.

New contributor

Danewd98 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.