vector< vector< vector<int> > > myArray(5, vector< vector<int> >(4));
vector<int> testArray();
myArray[0][0].push_back(testArray);
I don't understand. I'm just trying to append a new element to it.
Edit: Second line was wrong but this still doesn't compile.
#include <iostream>
#include <vector>
using namespace std;
int main() {
vector< vector< vector<int> > > myArray(5, vector< vector<int> >(4));
vector<int> testArray;
myArray[0][0].push_back(testArray);
return 0;
}
The compile error:
pnt.cpp: In function ‘int main()’: pnt.cpp:8: error: no matching function for call to ‘std::vector >::push_back(std::vector >&)’ /usr/include/c++/4.4/bits/stl_vector.h:733: note: candidates are: void std::vector<_Tp, _Alloc>::push_back(const _Tp&) [with _Tp = int, _Alloc = std::allocator]