On Oct 1, 11:19 pm, aman <cuteama...@gmail.com> wrote:
> CAN ANYBODY TELL ME THE CONCEPT OF COPY CONSTRUCTOR IN REALLY SINMPLE
> MANNER
Please do not use your CAPS LOCK when asking questions, as it
is considered as shouting and being rude.
The simple answer is, it makes copies
A class in C++ provides you with a copy ctor by default. Even
though you can't physically see it, it does exist.
The only time you need to manually implement it is for example,
if your class is is responsible for managing some memory for one
or a number of its data members.
The best way to learn about it is to experiment.
Looking up "deep copy" vs "shallow copy" should provide you with
a much better understanding of the concepts behind it.
Post back if you're still having problems understanding it, and
we'll try to clarify it further.
--
Chris Val