#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
template<class T>
class Print
{
public:
void operator ()(T& t){
cout << t << " ";
}
};
int main(){
vector<char> v(5);
Print<char> print;
cout << "Size of v = " << v.size();
fill(v.begin(),v.end(), '*');
cout << endl;
for (int i = 0; i < v.size(); i++){
cout << v[i] << " ";
}
cout << endl;
for (int i = 0; i < 5; i++){
cout << "Size of V = " << v.size() << endl;
for_each(v.begin(),v.end(),print);
cout << endl;
v.pop_back();
}
return 0;
}