You cannot store arrays in a vector or any other container. The type of the elements to be stored in a container (called the container's value type) must be both copy constructible and assignable. Arrays are neither.
You can, however, use an array class template, like the one provided by Boost, TR1, and C++0x:
std::vector<std::array<type, size> >
(You'll want to replace std::array with std::tr1::array to use the template included in C++ TR1, or boost::array to use the template from the Boost libraries. Alternatively, you can write your own; it's quite straightforward.)
@source By:James McNellis
So the code would look like:
int n;
std::vector<std::array<int,3>> A;
A.resize(n);
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…