22 lines
408 B
C++
22 lines
408 B
C++
#include <iostream>
|
|
#include <vector>
|
|
|
|
#include "GraphicsObject.h"
|
|
#include "Ball.h"
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
std::vector<GraphicsObject*> 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;
|
|
}
|