Sometimes, it is desirable that an empty vector be as small as possible. For example, someone might

Question:

Sometimes, it is desirable that an empty vector be as small as possible. For example, someone might use vector>> a lot but have most element vectors empty. Define a vector so that sizeof(vector) ==sizeof(int*), that is, so that the vector itself consists only of a pointer to a representation consisting of the elements, the number of elements, and the space pointer.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: