何が問題なのかわかりませんが、イテレータが参照しているオブジェクトのメソッドにアクセスできません。これは私が持っているものです:
multimap<long, Note>::iterator notesIT;
notesIT = trackIT->getNoteList().lower_bound(this->curMsr * 1000000);
while(notesIT->first / 1000000 == 1){
cout << notesIT->first.getStartTime() << endl; // error on this line
notesIT++;
}
次のエラーが表示されます。
error: request for member 'getStartTime' in 'notesIT. std::_Rb_tree_iterator<_Tp>::operator-> [with _Tp = std::pair<const long int, Note>]()->std::pair<const long int, Note>::first', which is of non-class type 'const long int'