I have a existed class and function which look like this:
Class base_class{
...
}
void Func(...,vector &vec_b,...){
// inside
No, you cannot convert between vectors of different types. However, you can achieve what you're trying to do by making Func a template. It probably won't require you to change any code in the actual function body, but it depends on what you're doing.
template
void Func(..., vector &vec_b, ...){
// inside the function, the vector vec_b is being re-organized and re-sized
}