Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

what is the difference between class to class type
conversion and copy constructor ?

Answer Posted / sujatha

CLASS TYPE TO CLASS TYPE:

In class to class type this can be achieved through either
by using TYPE CONVERSIONS OR BY USING CONSTRUCTORS.
here one class object is convrted into another class object


COPY CONSTRuctor:

here we r copying already existing object value to new
object of the same type.

and copy constructor will get called when we are creating
new object of the class at the same time we r intializing
the object with the already existing object.
ex:

A a1; //a1 is object of class A
A a2=a1 //a2 object of class A. a2 is a new object and a1
//is already existing object.

Is This Answer Correct ?    8 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

2. Give the different notations for the class.\

2219


Where is pseudocode used?

1160


what is graphics

2511


What is overloading and its types?

1244


How do you define social class?

1115


What is the significance of classes in oop?

1230


What does it mean when someone says I oop?

1121


What is destructor in oop?

1080


What is coupling in oops?

1218


What is a class oop?

1055


what are the realtime excercises in C++?

2893


What is static in oop?

1116


if i have same function with same number of argument but defined in different files. Now i am adding these two files in a third file and calling this function . which will get called and wht decide the precedence?

3598


i am getting an of the type can not convert int to int *. to overcome this problem what we should do?

2352


What are the 3 pillars of oop?

1243