I am creating a vector b1 with fixed size (like c-style array), for copying a1 followed a2. I thought of using assign as below, But size of b1 is reduced to 7(to size of a1) after b1.assign(). How can I keep the b1 size 20 (fixed size) even after assign(). Any suggestions, I am using memcpy() now.
std::vector<int> a1{1,2,3,4,5,6,7};
std::vector<int> a2{ 10,11,12,13,14,15,16,17 };
std::vector<int> b1(20);
b1.assign(a1.begin(),a1.end());