I am unclear about the following.
First, this code compiles fine:
#include
typedef struct{
int x1,x2,x3,x4;
} ints;
typedef std
Try boost::array instead of plain arrays. It provides STL-compliant interface around fixed-size arrays, so it can be used inside STL containers. Plus, it implements boundary checking (boost::array::at).
#include
#include
typedef std::vector< boost::array > vec;
int main(){
vec v;
boost::array va = {0,1,2,3};
v.push_back(va);
}