answersLogoWhite

0

A copy constructor is a separate, compiler created constructor for a class. This allows the programmer to instantiate a class and copy the contents of the given class into the new class. For example:

If I have a class foobar:

Foobar foobar;

Foobar foobar1( foobar );

The second line creates a class in the exact image of the original class, with all of its variables set the same way as the original class.

User Avatar

Wiki User

13y ago

What else can I help you with?