【发布时间】:2013-01-02 05:15:04
【问题描述】:
歌曲是一门课 我想访问它的公共方法之一
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;
}
为什么它没有显示迭代器的内容?
【问题讨论】:
-
它是否给出了编译器错误?
-
大概你在谈论你的IDE的一些特性,也许是Intellisense?你应该说清楚。你的问题不是关于 C++,而是关于你的 IDE
标签: c++ class methods vector iterator