CS Electrical And Electronics
@cselectricalandelectronics

What is a copy constructor?

All QuestionsCategory: Cpp LanguageWhat is a copy constructor?
CS Electrical And Electronics Staff asked 3 years ago

I need short information.

1 Answers
CS Electrical And Electronics Staff answered 3 years ago

Copy constructor is a special type of parameterized constructor using which one object can be copied into another object. This is normally used to initialize object with the values of already existing object. This constructor should have at least one argument of the same class and this argument must be passed as a constant.