Ver Mensaje Individual
  #7 (permalink)  
Antiguo 15/09/2014, 02:53
ecfisa
 
Fecha de Ingreso: julio-2012
Mensajes: 133
Antigüedad: 12 años, 6 meses
Puntos: 22
Respuesta: Pasar de segundos a horas,minutos y segundos correspondientes.

Tenes razón, al escribir invertí la operación en la segunda línea.

Debería haber sido:
Código C++:
Ver original
  1. void segsToHMS(const unsigned int sgs, int& h, int& m, int& s) {
  2.   h = sgs / 3600;
  3.   m = sgs % 3600 / 60;
  4.   s = sgs % 3600 % 60;
  5. }