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

write a program that withdrawals,deposits,balance check,shows mini statement. (using functions,pointers and arrays)

2296


What is iterator c++?

931


Do inline functions improve performance?

1015


Give the difference between the type casting and automatic type conversion. Also tell a suitable C++ code to illustrate both.

1004


How do you declare A pointer to a function which receives nothing and returns nothing

1175


What is class syntax c++?

1094


What is recursion?

1944


What is the use of structure in c++?

972


What is the precedence when there is a global variable and a local variable in the program with the same name?

1070


Write is a binary search tree? Write an algo and tell complexity?

974


What is difference between array and vector in c++?

978


How are pointers type-cast?

1064


Write about the various sections of the executable image?

936


What are the advantages of pointers?

1017


What is c++ coding?

1133