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...

When copy constructor can be used?

Answer Posted / vikas sood

hi fellows..try this code
class A {
public:
A() { }
A(const A& rhs)
{
cout<<"inside copy constructor..";
}
};

int main()
{
std::vector<A> aVec(10);
}

The answer to this is another reason a copy constructor
will be called.

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is c++ map?

1167


Define 'std'.

1179


What causes a runtime error c++?

1130


What is flush programming?

1020


What are the uses of pointers?

1079


What are the defining traits of an object-oriented language?

1210


Explain queue. How it can be implemented?

1162


How can you differentiate between inheritance and implementation in c++?

1222


Is c++ harder than java?

1076


Explain mutable storage class specifier.

1094


What is the difference between set and map in c++?

1136


What is the difference between a reference and a pointer?

1123


Is python written in c or c++?

1153


Which function should be used to free the memory allocated by calloc()?

1028


What is c++ and its features?

1019