Answer to Question #47951 in C++ for edzel

Question #47951
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
Expert's answer
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!

Comments

No comments. Be first!

Leave a comment

Ask Your question

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS
paypal