I tried using the sort but i get an error saying that algorithm line 3255 has a problem or something close to that line...
What is the error message?
<algorithms> before so im kinda new to it..
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
void sortMovieTitle(Movie topMovies[]){
string name = topMovies[0].title;
bool swapped;
for(int x = 0; x < SIZE - 1; x++){
swapped = false;
for(int y = 0; y < SIZE - 1; y++){
if(topMovies[x].title > topMovies[x+1].title){
swap(topMovies[x].title, topMovies[x+1].title);
swapped = true;
}
if(swapped){
break;
}
}
}
}
|
It somewhat works, but its not comparing characters or strings....
Last edited on