Trying to iterate through a vector in a class in C++ using:
for(vector<Album>::iterator it = a.getAlbumList.begin(); it != a.getAlbumList.end(); it++)
yet it gives me the error:
error: ‘a.AlbumCollection::getAlbumList’ does not have class type
This is frustrating me as I have no idea what this means, and I have tried to follow other suggestions but to no help. I’m only just a beginner, so if some one could explain this to me simply that would be great thanks.
Here is the class:
.cpp: http://pastebin.com/MSCcHjXb
.h: http://pastebin.com/Xq4nqSan
You (apparently) want to call the
getAlbumListmember function, so your code should be: