|
-
March 7th, 2011, 11:12 PM
#2
Re: vector vs. deque
 Originally Posted by dellthinker
So in personal opinion, would deque's be a better choice for creating array's than vectors?
One major advantage of vector is that it is compatible with any 'C' or C-like routine that expects a contiguous buffer of type T (i.e. an array of T). The deque is not compatible and cannot be used this way.
A lot of C++ code uses vector not only as a resizable array, but for the purpose of using an RAII type that is compatible with legacy functions that take a T* or array of T.
Does massive reallocation's in vectors subject the array to a buffer overflow if it was ever 'flooded' with information?
I don't know what you're referring to. Please explain.
Regards,
Paul McKenzie
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|