It looks like the intention is more like:
static vector < vector<Point> > vec;
If so, then with some short testing in the C++11, Windows 64-bit C++Builder compiling and running, that obtains the desired result. As an additional experiment, after defining parameter-less and passed value constructors for the Point (class?) type used in the example, calling push_back on the multidimensional vec works as well:
vec.push_back( {{1,2}, {3,4}} );
vec.push_back( {{0,0}} );
vec.push_back( {{4,5}} );
I am confident the reason the Point class can be neglected is because the multidimensional vec vector has been declared to store Point instances. The last line in the OP above of passing an empty Point does not achieve anything, as can be shown when traversing the vec. The third element (index two), will not print a thing. The {4, 5} Point has been added to test traversing to all indices of the vec. Notice that there are two sets of curly braces inside the call of push_back. Without the outer set of curly braces, the compiler error says, "no matching member function for call to push_back."
Sample code to traverse the multidimensional vector (e.g. matrix or array):
//
// Declared a typedef to separate the vector row and the whole matrix
// Makes it simpler to traverse each vector row later. intVals is a
// test class with public integer elements "a" and "b". The intVals
// class substitutes for the Point type in the OP above.
//
typedef vector<intVals> vec_t;
vector<vec_t> matrix;
int jj;
for (int i = 0; i < 3; i++)
{
jj = 0;
for (vec_t::iterator j = matrix[i].begin(); j != matrix[i].end(); j++)
{
cout << "Matrix at index: " << i << ", element: " << jj << " a = " << (*j).a;
cout << " b = " << (*j).b << endl;
jj++;
}
}
Note that the outer loop is clamped at three. The real implementation could use the matrix::iterator instead (or a range for).
For additional reference on a multidimensional vector see the multidimensional vector, how to forum posting.