برای این کار اول با تابع remove کلیه تکرارهای عدد مشخص را بدست بیارید و سپس با تابع erase حذفش کنید به صورت زیر :
vector<int> a(20);
for (auto &b:a){
b = rand()%5;
cout << b << endl;
}
vector<int>::iterator k = remove(a.begin(),a.end(),3);
a.erase( k,a.end());
cout << "*************" << endl;
for (auto &d:a){
cout << d << endl;
}