#include <iostream>
#include <vector>
using namespace std;

class Obj
{
public:
	Obj(int x, int y) : _x(x), _y(y)
	{
		
	}
	
	int _x;
	int _y;
};

int main() 
{
	std::vector<Obj> obj;
	obj.emplace_back(10, 20);
	std::cout << obj[0]._x << " " << obj[0]._y << std::endl;
	obj[0]._x = 100;
	std::cout << obj[0]._x << " " << obj[0]._y << std::endl;
	
	std::vector<Obj> obj2;
	obj2.reserve(1);
	obj2[0] = Obj(30, 40);
	std::cout << obj2[0]._x << " " << obj2[0]._y << std::endl;
	obj2[0]._x = 100;
	std::cout << obj2[0]._x << " " << obj2[0]._y << std::endl;
	
	return 0;
}