#include <iostream>
#include<vector>
using namespace std;
int main()
{
vector<int>array;
int i;
///save some value
for(i=0;i<10;i++)
{
array.push_back(i);
}
cout<<"
Max: "<<array.max_size();///highest space we can use in this vector
cout<<"
Capacity: "<<array.capacity(); ///the total space we are using now
cout<<endl;
return 0;
}
Output
Max: 1073741823
Capacity: 16
Add your comment