menu
QAmmunity.org
Login
Register
My account
Edit my Profile
Private messages
My favorites
Ask a Question
Questions
Unanswered
Tags
Categories
Ask a Question
When a dynamic array with a class for a base type is declared, which constructor is called?
asked
Sep 6, 2018
233k
views
5
votes
When a dynamic array with a class for a base type is declared, which constructor is called?
Computers and Technology
high-school
Orkenstein
asked
by
Orkenstein
7.4k
points
answer
comment
share this
share
0 Comments
Please
log in
or
register
to add a comment.
Please
log in
or
register
to answer this question.
1
Answer
3
votes
The default constructor is called for each element of the array. So if you declare an array with 100 elements (object instantiations), the constructor is executed 100 times!
Mavrosxristoforos
answered
Sep 12, 2018
by
Mavrosxristoforos
7.5k
points
ask related question
comment
share this
0 Comments
Please
log in
or
register
to add a comment.
← Prev Question
Next Question →
Related questions
asked
Oct 27, 2024
209k
views
What happens when you define a class that used dynamic memory allocation and define a destructor but no copy constructor? a. If an object of the class is plugged in for a call-by-value parameter, when
Gafar
asked
Oct 27, 2024
by
Gafar
8.7k
points
Computers and Technology
high-school
1
answer
1
vote
209k
views
asked
Oct 19, 2024
105k
views
Implement the room class, 2) write the constructor for building class such that it initializes rooms to an array of rooms according to the number of rooms and rooms area sizes given in rooms areas array.
Gabriel H
asked
Oct 19, 2024
by
Gabriel H
8.5k
points
Computers and Technology
high-school
1
answer
0
votes
105k
views
asked
May 10, 2024
48.5k
views
Write a class encapsulating the concept of daily temperatures for a week. Write the following methods: A constructor accepting an array of seven temperatures as a parameter Accessor, mutator, tostring,
Adeel Turk
asked
May 10, 2024
by
Adeel Turk
8.1k
points
Computers and Technology
high-school
1
answer
3
votes
48.5k
views
Ask a Question
Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.
9.4m
questions
12.2m
answers
Other Questions
“What does it mean when we “rework” copyrighted material?”
Please help me ! All you do is just put it it all in your own words ! Please this is for my reported card!i don't know how to put it in my own words because my English is not that good!
Explain why binary codes are used to represent characters, numbers and symbols :)
This is science they just dont have the subject buy anyways describe interactions you have with the environment that you depend on to meet your basic needs hope u can help
If a person sends email from a school computer or a business computer, should that message be considered private? Does the institution or person that owns the computer from which email is sent have a right
Twitter
WhatsApp
Facebook
Reddit
LinkedIn
Email
Link Copied!
Copy
Search QAmmunity.org