I played with templates. Using them it's possible to abstract from the type of container, for example below vector can be any POD type.
template<class T>
void show(vector<T> &a) {
typename vector<T>::iterator end = a.end(), start = a.begin();
for(start; start!= end; start++) {
cout<<*start<<" ";
}
}
I use it so:
vector<int> vect_storage;
show(vect_storage);
I wonder is it possible to create such show method which would be capable to show not only vector but map, list, dequeue from STL library as well?