danteF9827 danteF9827
  • 21-08-2019
  • Computers and Technology
contestada

What is a constructor? Why would you include a constructor in a class?

Respuesta :

Cetacea
Cetacea Cetacea
  • 26-08-2019

Answer:

Constructor in the class is the member function that gets into action when any new object gets created in the class ,it gets invoked. It does not have any return type and no void return.

The constructor is used in the class because there is the requirement for the initializing of the new object and then only object can do the functioning in the program.

Answer Link

Otras preguntas

which best explains the importance of creating an outline a it lets the reader know where you find your information b it grabs the attention of your reader c it
The English gained control of the valuable Altamaha River by
La banda de la escuela va a _____ unas canciones en disco compacto la semana próxima.
Which statement describes the relationship between the rate of reaction and the temperature?
Simplify the expression by combining like terms. 8m + 13g - 8 +3m-g
Please help!!! Will give brainly!! 50 points. Explain the cycling of energy between the processes of photosynthesis and cellular respiration.
does anyone know what the answer is?
please help with problems 6 and 7
Cold War conflict in south east Asia from 1950-53 who eventually involved the Chinese red army who forced the American army
Find the ratio a:b, if it is given that a/5 = b/7