Song 是一个类,我想访问它的一个公共方法
class RadioManager {
std::vector<Song> all_songs;
public:
void addSong(const Song& song);
}
void mtm::RadioManager::addSong(const Song& song){
vector<Song>::iterator i;
for (i = all_songs.begin(); i != all_songs.end(); ++i) {
i->getSongName(); // When i type i-> i don't get the list of methods in the class song;
}
为什么它没有显示迭代器的内容?