<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
 A ver... no te informaron hace tiempo como comparar dos fechas, ya veo que te gusta el camino lento y difícil...<br><br>...<br>...<br>   long secTiempo= time( NULL ); // -long=time_l- ,  tiempo en segundos<br>   struct tm tmTiempo;           // estructura de tipos -enteros- <br><br>   tmTiempo=*localtime(&secTiempo); // convierte un<b> long</b> en una<b> estructura tm<br></b><br>   <b>secTiempo=mktime(&tmTiempo);</b><br><br>   cout << "- Hoy es día " << tmTiempo.tm_mday << " del "<<tmTiempo.tm_mon +1 << " de " << tmTiempo.tm_year+1900 << endl;<br>   cout << "- Han transcurrido " << mktime(&tmTiempo) << " segundos desde el ... vete a saber" << endl;<br>...<br>...<br><br><a href="%20http://c.conclase.net/librerias/funcion.php?fun=mktime">http://c.conclase.net/librerias/funcion.php?fun=mktime</a><br><br>y repecto a tu error , se refiere a la declaración de las estrcuturas <b>fini</b> y<b> ffin</b>, posiblemente declaradas cómo punteros de contenido constante o fijo por lo que no es necesario que uses el <b>ampersand &</b>, no crees? <br><br>--------------------------------------------<br><br>> To: cconclase@listas.conclase.net<br>> From: ferververa@gmail.com<br>> Date: Wed, 10 Jun 2009 17:13:57 +0200<br>> Subject: [C con Clase] a vueltas con mktime<br>> <br>> list<T> organizador<T>:: grep(const tm & fini, const tm & ffin) const{<br>> <br>> ...<br>> <br>> const time_t inicio=mktime(&fini);<br>> const time_t final=mktime(&ffin);<br>> <br>> Con respecto a la pregunta que hice anteriormente este es código que tengo. Necesito comparar las  fechas y para ello trasformo los tm en time_t. Pero me da este error:<br>>  error: conversión inválida de ‘const tm*’ a ‘tm*’<br>> error:   argumento de inicialización 1 de ‘time_t mktime(tm*)’<br>>  <br>> Los tm tienen que ser constantes pero no me deja transformarlo a time_t.<br>> _______________________________________________<br>> Lista de correo Cconclase Cconclase@listas.conclase.net<br>> http://listas.conclase.net/mailman/listinfo/cconclase_listas.conclase.net<br>> Bajas: http://listas.conclase.net/index.php?gid=2&mnu=FAQ<br><br /><hr />Get news, entertainment and everything you care about at Live.com. <a href='http://www.live.com/getstarted.aspx ' target='_new'>Check it out!</a></body>
</html>