Can we create an array of objects for a class having default constructor?. Justify your answer.
sami9356
0
Newbie Poster
Recommended Answers
Jump to PostWe can create an array of objects for any class , irrespective of whether it has a default constructor or not
Is the above really true?
Please see ...
http://en.wikipedia.org/wiki/Default_constructor
and …
Jump to Post@Akash_Soni
Your reply is true ... in the case where your design actually does call (i.e. the program uses it) the default ctor ... other-wise (sometimes) ... you may not want to code for the default ctor ... i.e. the case where you want your compiler to issue an error …
All 7 Replies
Avishek_1
-3
Newbie Poster
David W
131
Practically a Posting Shark
Akash_Soni
0
Newbie Poster
David W
131
Practically a Posting Shark
Akash_Soni
0
Newbie Poster
Akash_Soni
0
Newbie Poster
tapananand
13
Junior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.