I have a class that looks like this:
class Image {
public:
int * pixels;
class iterator {
//help here
}
begin(){}
end(){}
///other code to manipulate those pixels
}
All I have to do is make it so that Image::begin()
and Image::end()
functions return the corresponding object of type Image::iterator
. I understand that this a silly thing to do when I could just use a normal int array iterator but its for a project and the return type is part of the requirement. I have no need to change any other functionality.
Aucun commentaire:
Enregistrer un commentaire