Basically, a vector is a container that can store multiple values. Think of it as a resizable array; it automatially resizes itself whenever needed eg. when you add an element.
One important feature is that you can create a vector to hold elements of any type you like; int, double or even your own structs/classes. It's simply a *container*, an empty shell to store other objects.
Example:
Code:
#include <vector>
//like cout, vector is part of std
using namespace std;
int main()
{
//our vector will be named X, and will hold values of type int
vector <int> X;
//our second one holds doubles
vector <double> Y;
//add an element to vector; resizing is done automatically
X.push_back(1);
int n = 123;
X.push_back(n);
n = some_function();
X.push_back(some_function());
//now retrieve values
//basic way would be to use size() in the vector
for(int i = 0; i < X.size(); ++i)
{
cout << "Element #" << i << " is " << X[i] << "\n";
}
}
Hope that helps. There are lots of stuff about vectors and other similiar standard C++ library containers out there on the net, just Google around.