When we write Vector v (1000) how is it fixing the maxsize of arr to 1000 as in the constructor we have initialised the maxsize by default which has a fixed value of 4?
About a default parameter in the constructor
i think you have doubt in default parameters
A default argument is a value provided in a function declaration that is automatically assigned by the compiler if the caller of the function doesn’t provide a value for the argument with a default value.
in constructors we set default parameter =4
it is used only when this parameters is not given caller function
if you provide v(1000)
then size will become 1000