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
The files are meteorological radar data whose decompression is badly needed for relative study. Please contact Kathy Lee (Email: ; Cell phone: 0086 15701799056) or Mr. Zhu (Email:

#include stdio.h> #include conio.h> #include string.h>   void main() {           char a[50],b[25][25],l[25],temp1;           int i=0,j=0,k=0,l1[25],c=0,c1=0,t=

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

What are the different types of endless loops? An endless loop can be of two types: i.) A loop that is intentionally designed to go round and round until the condition withi

i am using mobile phone if i want to communicate via massage but that should be very secret

Poker Room auto seat program Project Description: I want a script for an online poker site. It requires to be scanning all the available tables and when the table meets certa

Define the Volatile Keyword Qualifiers in C Language? The volatile keyword proceed as a data type qualifier and a volatile variable is for dynamic use. E.G. for data that is to

Question A bank normally updates it's clients accounts at the end of each month.Of the two types of bank accounts:savings and checking, a client must maintain a minimum balance

Question : (a) How does a structure differ from an array? (b) Describe how a structure differs from a union? (c) Declare a union called ‘clothes' which consists of the

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. The area under a curve between two points can b