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

(a) Write a procedure called (mult x y) that multiplies two numbers x and y in a recursive manner using successive addition. Specifically, note that a x b = a + a + .... + a (b tim

When declaring a variable of data type pointer, use the * in front of the variable name. These variables hold a memory location (like B45CDF), not an actual value like 30 or A:

write a pseudocode algorithm for a program that accepts a number and prints out its reciprocal(1/n) is required.the program should prevent the user from entering zero by asking t

Write a 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

C o n t r o l S t r u c t u r e s I t i s o f t h r e e t y p e s: 1 .    S e qu e n c e s t r u c t u r e 2 .

Define External Static Storage Class - Computer Programming? An external static is declared outside of all the functions and is obtainable to all functions in that program. The

a program to find the area under 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, /* G