#include <iostream>
#include <vector>

class C
{
int ID = 0;

public:
C(const int newID)
{
    ID = newID;
}

int getID()
{
    return ID;
}
};

int main() {
	std::vector<C> pack;
	pack.reserve(10);
	printf("pack has  %i\n", pack.size()); //will print '0'
	pack[4] = C(57);
	printf("%i\n", pack[4].getID()); //will print '57'
	printf("pack has  %i\n", pack.size()); //will still print '0'
	pack.at(4) = C(57); // exception
	
}