Thanks for the quick reply. Can you please give me an example of
usage?
#include <iostream>
#include <vector>
using namespace std;
int main()
{
vector<int> v(3); // Create vector with 3 default constructed
elements.
v[0] = 100;
v[1] = 200;
v[2] = v[1] + v[0];
v.push_back(123); // Add one element to the v, v now has 4 elements.
v.push_back(321); // Add one element to the v, v now has 5 elements.
v.resize(10); // Resize v to 10 elements
v[9] = 12345; // Set value of last element of v
// Dump contents of v
for(int i=0; i < v.size(); ++i)
{
cout << "v[" << i << "] = " << v
<< endl;
}
return 0;
}
HTH