Bonjour
j ai un probleme avec une constante,
cette fonction est censé renvoyer un pointeur vers un vecteur.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
  Interval* Schedule::return_interval(Interval* i)const{
	for (Schedule::const_iterator it = begin(); it != end(); it++){
		if ((*it)->getInterval()->getId()==i->getId() && (*it)->getInterval()->getAvailabilityStart()==i->getAvailabilityStart()){
			return *it->getInterval() ;
		}
	}
}
lors de la compilation, j obtient cette erreur, pouvez vous m'aider SVP

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
src/Schedule.cpp: In member function ‘Interval* Schedule::return_interval(Interval*) const’:
src/Schedule.cpp:104:16: error: request for member ‘getInterval’ in ‘* it.std::_Rb_tree_const_iterator<_Tp>::operator-> [with _Tp = const Allocation*, std::_Rb_tree_const_iterator<_Tp>::pointer = const Allocation* const*]()’, which is of non-class type ‘const Allocation* const
tout apport va etre utilise
Merci