Vectors in cpp doubt

if vectors automatically double their memory once they are full, why is there a push_back function to add an element in the end of the vector.

hey @sans_sehgal, push_back() is to push the elements from back, it will keep pushing the element and when vector if full, vector size gets double so that other elements can further pushed to vector.