I always use resize() because I cannot use reserve as it gives error: vector subscript out of range. As I\'ve read info about the differences of resize() and reserve(), I sa
resize(n) allocates the memory for n objects and default-initializes them.
reserve() allocates the memory but does not initialize. Hence, reserve won't change the value returned by size(), but it will change the result of capacity().