the following code doesn't compile with gcc 4.7.0 (using std=c++11 -O3)
int n;
std::vector< int[4] > A;
A.resize(n);
the error message is length, but eventually
functional cast to array type ‘_ValueType {aka int[4]}‘
Is this correct? or should this compile? And more importantly, how to avoid this problem? (without defining a new struct to hold the int[4]
)
EDIT:
how to solve the problem with C++98?