How can I resize a 4d vector in C++?
A:
if you are using an stl vector
, then a simple push_back() will add an extra element. If you are using C styled arrays then you may have to copy the smaller array into a new bigger array.
doron
2010-08-25 21:02:21
+1
A:
Depends entirely on which dimension you're attempting to resize, but
void resize( size_type num, TYPE val = TYPE() );
would likely be a good place to start. If you want more specific help, you may need to make your question more specific. Code snippets are especially useful also, if you seek an accurate answer to your situation.
KevenK
2010-08-25 21:04:19