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

Explain terminate() and unexpected() function?

630


What do you mean by translation unit?

607


What do you understand by a pure virtual member function?

556


Is there any difference between int [] a and int a [] in c++?

561


What are default parameters? How are they evaluated in c++ function?

675






What happens if a pointer is deleted twice?

797


Explain queue. How it can be implemented?

687


What is the latest c++ standard?

692


What is lvalue?

704


C is to C++ as 1 is to a) What the heck b) 2 c) 10

645


What is the use of endl in c++ give an example?

620


Which recursive sorting technique always makes recursive calls to sort subarrays that are about half size of the original array?

616


Can I learn c++ as my first language?

617


Is java as fast as c++?

612


If I is an integer variable, which is faster ++i or i++?

600