elliedolman4318 elliedolman4318
  • 09-10-2019
  • Computers and Technology
contestada

The class constructor cannot have any return type?

Respuesta :

ExieFansler ExieFansler
  • 10-10-2019

Answer:

No.

Explanation:

The class constructor does not have any return type.The constructor does not return any value.The constructor is used to initialize an object.The constructor of the class has the same name as the class.For example:-

class Number{

private:

int a ;

int b;

};

For this class the constructor name is Number().

The default constructor is always present in the class when the class is created.It gets deleted when the user defines it's new parameterized constructor.

Answer Link

Otras preguntas

Why does the speaker of the love song of J Alfred Prufrock tell us more than once that the woman come and go talking of michelangelo?
b-1.6=(0.4) to the second power. SHOW WORK
Why is haiku unlike other forms of poetry?
Which body systems will be directly affected if a tendon gets torn and cannot function properly? Choose all answers that are correct. A. muscular system B. ci
why has the atomic model changed over time?
In the early 1800s, which of the following was not authorized to issue currency? a. cities b. stores c. churches d. counties
Given two complementary angles and one measures 32 degrees, find the measure of the other angle?
What's one fifth of 50 percent
A group of fish is called a school. What is a group of roads called?
a cell with 5 chromosomes in the G1 phase will have ____ chromatids in the G2 phase