not all control paths return a value
i loathe that warning.
****!!. i can't see why!! can you?
Code:
cvehiculo *citerador::obtener_siguiente()
{
if (this->nodo_actual==NULL)
{
this->nodo_actual=this->lista.get_primero();
cvehiculo *vtemp=(this->nodo_actual->get_vehiculo());
return vtemp;
}
else
{
if (this->nodo_actual!=NULL)
{
while (this->nodo_actual!=NULL)
{
this->nodo_actual=(this->lista.obtener_siguiente(this->nodo_actual));
if (this->nodo_actual)
{
cvehiculo *vtemp=(this->nodo_actual->get_vehiculo());
return vtemp;
}
else
return NULL;
}
}
else
return NULL;
}
}
thanks