hi all,
i don't understand what's wrong:
1)
std::vector<double[3]> p(10);
doesn't compile:
/usr/include/c++/3.2.2/bits/stl_vector.h: In constructor
`std::vector<_Tp, _Alloc>::vector(unsigned int) [with _Tp = double[3],
_Alloc = std::allocator<double[3]>]':
main.cpp:9: instantiated from here
/usr/include/c++/3.2.2/bits/stl_vector.h:342: ISO C++ forbids casting
to an array type `double[3]'
2)
std::vector<double[3] p;
p.resize(10);
doesn't compile:
/usr/include/c++/3.2.2/bits/stl_vector.h: In member function `void
std::vector<_Tp, _Alloc>::resize(unsigned int) [with _Tp = double[3],
_Alloc = std::allocator<double[3]>]':
main.cpp:10: instantiated from here
/usr/include/c++/3.2.2/bits/stl_vector.h:703: ISO C++ forbids casting
to an array type `double[3]'
3)
std::vector<double[3]> p;
p.reserve(10);
it's ok.
i'm using g++ 3.2.2