c**********e 发帖数: 2007 | 1 What is the output of the following code? And why?
#include
#include
using namespace std;
int main() {
vector v;
for(int i=0;i<100;i++) v.push_back(i);
cout << v.capacity() << endl;
return 0;
} | x******7 发帖数: 49 | 2 no exact answer, but it has to be larger than v.size(), 100. | c**********e 发帖数: 2007 | 3 Why did I get 103? The number 103 really confused me. |
|