What is a constructor initializer list and when we use
constructor initializer list?

Answer Posted / deep

There is couple special case when you need mandatory
constructor initialization list.

a. To initialise a const
b. To initialise a reference

Is This Answer Correct ?    12 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is linux written in c or c++?

555


What are the benefits of operator overloading?

682


What is the type of this pointer in c++?

633


List the advantages of inheritance.

645


Write a program that takes a 5 digit number and calculates 2 power that number and prints it.

2069






How can we check whether the contents of two structure variables are same or not?

583


Are there interfaces in c++?

558


What is #include c++?

569


Why is "using namespace std;" considered bad practice?

653


Can there be at least some solution to determine the number of arguments passed to a variable argument list function?

603


How do c++ struct differs from the c++ class?

592


Is c++ map a hash table?

567


Why is c++ so fast?

530


What is iomanip c++?

597


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

607