what does this mean that copy constructor is called only once when we create an object but we can call the assignment operator as many times we want?
OOPs- copy assignment operator
@a19JE0093
hello Akshat,
we know that constructors are the functions that run or called only when object is created.
copy constructor is also a constructor so it is called only when object is created and because any object is created only once copy constructor will run only for once.
assignment operator is overloaded operator and we can use any number of time.
read more about their difference here
->https://techdifferences.com/difference-between-copy-constructor-and-assignment-operator.html