I want to ask that we use push_back function in vector to have doubling and we don’t use cin bcoz it can’t do doubling but if I reserve the vector of some size (let n) and try to input elements (let n-1 elements) in vector using cin , so cin also does not work there . WHY ?
Regarding reserve function in vector
u can do it like this
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.
Can you give me a program as an example ?
i didn’t get… what example do u need?