if (count > 0) {
for( i = 0; i <= MAX - 2; i++){
for( j = i + 1; j <= MAX - 1; j++){
if(stud[i].getEdad() > stud[j].getEdad()){
tempura=stud[i].getEdad();
stud[i].getEdad() = stud[j].getEdad();
stud[j].getEdad() = tempura;
}
}
}
cout <<"---------------------------------------\n";
} else {
cout <<"NONE\n";
}
What is wrong about this please help
the output for this is
0. 0
1.0
2.0
it must be:
if(stud.getEdad()> stud[j].getEdad())
{
tempura=stud.getEdad();
stud.getEdad(stud[j].getEdad());
stud[j].getEdad(tempura);
}
[i]
[i]Becauseyou cannot assign a value of function
Better if you send me all the code[i]
Need a fast expert's response?
Submit order
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!
Learn more about our help with Assignments:
C++