it's also easier if you return a reference instead of a pointer like:
vector<ofImage> & GridElement::getImages(){
return images;
}
that way you get a reference to the original object but still can use the normal syntax like:
grid.getImages()[i]
be aware that if you do:
vector<ofImage> images = grid.getImages();
you are doing a copy but you can always do:
vector<ofImage> & images = grid.getImages();
or even easier:
auto & images = grid.getImages();