Good evening!

Why i'm getting the following error message? How can i fix it?
Qt Code:
  1. QList<Number> Historic::descendingOrder(QList<Number> ranking)
  2. {
  3. Number aux(0, 0);
  4. int length = ranking.size( );
  5.  
  6. for(int i = 0; i < length; i++)
  7. {
  8. for(int j = 0; j < (length - 1); j++)
  9. {
  10. if(ranking.at( j ).acum < ranking.at(j + 1).acum)
  11. {
  12. aux.val = ranking.at(j + 1).val;
  13. aux.acum = ranking.at(j + 1).acum;
  14. ranking.at(j + 1).val = ranking.at( j ).val; //Error message here
  15. ranking.at(j + 1).acum = ranking.at( j ).acum; //Error message here
  16. ranking.at( j ).val = aux.val; //Error message here
  17. ranking.at( j ).acum = aux.acum; //Error message here
  18. }
  19. }
  20. }
  21.  
  22. return ranking;
  23. }
To copy to clipboard, switch view to plain text mode 

D:\Programming\C-C++\Qt\Windows\historic.cpp:121: error: assignment of member 'Number::val' in read-only object
ranking.at(j + 1).val = ranking.at( j ).val;
Everything in "Number" class is public. I don't understand!