#include
#include
using namespace std;
void show(const char *msg, vector vect);
int main() {
// Declare a vector that has an initial capacity of 10.
vector v(10);
for(unsigned i=0; i < v.size(); ++i) v[i] = i*i;
show("Contents of v: ", v);
// Add elements to the end of v.
v.push_back(100);
v.push_back(121);
return 0;
}
// Display the contents of a vector.
void show(const char *msg, vector vect) {
cout << msg;
for(unsigned i=0; i < vect.size(); ++i)
cout << vect[i] << " ";
cout << "\n";
}