#include #include #include "GraphicsObject.h" #include "Ball.h" int main(int argc, char *argv[]) { std::vector objects; GraphicsObject graphics_obj(7); objects.push_back(&graphics_obj); Ball ball1; objects.push_back(&ball1); Ball ball2; objects.push_back(&ball2); for(auto obj : objects) for(auto i = 0; i < 5; ++i) std::cout << obj->X() << std::endl; }