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
#questio#A Padovan string P(n) for a natural number n is defined as: P(0) = ‘X’ P(1) = ‘Y’ P(2) = ‘Z’ P(n) = P(n-2) + P(n-3), n>2 where + denotes string concatenation. For a string

The task consists of two parts which are both preferably implemented in one source file. Towards the end of this document you will find a code skeleton that you must assume. Start


Write a program that computes the cost of a long distance call. The cost of the call is determined according to the following rate schedules. a. A call made between 8:00 AM and

program that generate university statistical bar graph using 3d function

Project Description: We are seeking someone to search mp3 link form audio or m3u8 for videos. Skills required are .NET, C Programming, Engineering, C# Programming

redirection in c++

A body which has three forces acting on it is in equilibrium. One force is 3N to the North and the other is 4N to the west. What us the magnitude and direction of the third force?

How do you know that your class requires a virtual destructor? A: If at least your class has one virtual function, you must make a destructor for this class virtual. It will let

Write a function that has int parameter n, makes another type of mask having n bit 1's from the left most bit and 32- n bit 0's next. The mask is called netmask in this seminar, an