Mega Code Archive
Put more values onto the end of the vector,it will grow as needed
#include
#include
#include
using namespace std;
int main()
{
vector v(10); // create a vector of length 10
unsigned int i;
// display original size of v
cout << "Size = " << v.size() << endl;
// assign the elements of the vector some values
for(i=0; i<10; i++) v[i] = i + 'a';
// display contents of vector
cout << "Current Contents:\n";
for(i=0; i