Some doubts in the topic of designing our own vector class

In the problem of Designing our own vector, In many places bhaiya wrote the term ‘const’ in the code
for example:
void push_back(const int d)
void pop_back const()
Q1. What is the use of const, why do we use it ?
Q2. Why did he write const outside popback ?
Q3. why did he write const inside the bracket in the case of pushback ?
please explain the difference between the two??

hello @Tiwary725 ,
const is a keyword in c++., which is used with functions or variable to make them constant (i.e they can not be modified)

here bhiaya is using const with some functions because we dont want to allow them to modify the object/data on which they are called.

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.