C++ Programming - Constructors and Destructors - Discussion
Discussion Forum : Constructors and Destructors - General Questions (Q.No. 2)
2.
What happens when a class with parameterized constructors and having no default constructor is used in a program and we create an object that needs a zero-argument constructor?
Discussion:
22 comments Page 3 of 3.
Lalit said:
1 decade ago
Because, when we build an object, then the constructor is call.
Kavita said:
1 decade ago
Constructor errors are always genrated at compile time. If we write a constructor, then compiler only deals with that constructor, not go for default constructor. So wehen we create a object having no parameter. It generates error.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers