Copy constructor, C/C++ Programming

What is copy constructor? describe the concept of copy constructor.

Posted Date: 2/12/2013 6:31:02 AM | Location : United States





Answer of the following question

Constructor which initializes the it''s object member variables ( by shallow copying) with another object of similar class. If you don''t implement one in your class then compiler implements one for you. for example:

(a) Boo Obj1(10); // calling Boo constructor

(b) Boo Obj2(Obj1); // calling boo copy constructor

(c) Boo Obj2 = Obj1;// calling boo copy constructor

Hope this explanation will help you.

Posted by Amy | Posted Date: 2/12/2013 6:35:40 AM


Related Discussions:- Copy constructor, Assignment Help, Ask Question on Copy constructor, Get Answer, Expert's Help, Copy constructor Discussions

Write discussion on Copy constructor
Your posts are moderated
Related Questions
Problem: (a) Describe a linked list. (b) Explain the three different types of linked list with the help of diagrams. (c) Give two advantages and two disadvantages o

Stage One Define the specification of the program            Add two nxm size matrices   Stage Two Divide the program up into separate modules           Input Matrix         Ad

program that convert take decimal digit and convert it to binart digit

Byteland county is very famous for luminous jewels. Luminous jewels are used in making beautiful necklaces. A necklace consists of various luminous jewels of particular colour. Nec

Virtual Functions The keyword virtual was previously used to resolve ambiguity for a class derived from two classes, both having a common ancestor. These classes are known as v

Need help finishing my homework. It''s been 5 years since I''ve use C++. I am a VN.Net programmer. -Todd

Is it legal for a member function to say delete this? A: As long as you're cautious, it's OK for an object to delete this. Here's how I define "cautious": You have to be a

c-program to find the area under the curve y=f(x) between x=a and x=b integrate y=f(x) between the limits of a and b   #include float start_point, /

What are pre-processor directives? - Pre-processor directives are placed at the beginning of a C program. They begin with # symbol. - This is the place, where library files

palindrome program with minimum character replacements