Login
Remember
Register
CodersEditor Q&A
Online IDE
Questions
Unanswered
Tags
Users
Ask a Question
Programming Tutorials
Ask a Question
Can we provide one default constructor for our class?
0
votes
asked
Jan 21, 2021
by
abitha
(
1.6k
points)
c
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
Jan 22, 2021
by
Annie
(
1.1k
points)
selected
Jan 22, 2021
by
abitha
Best answer
No default constructor is created for a class that has any constant or reference type members. If any of the above is false, then the constructor is nontrivial.
Please
log in
or
register
to add a comment.
Welcome to CodersEditor Q&A, where you can ask questions and receive answers from other members of the community.
239
questions
203
answers
2
comments
692
users
Related questions
What is the default constructor?
Why do we need the Friend class and function?
Can we call C++ OOPS and Why?
What is singleton class in Java and how can we make a class singleton?
What is a default argument in C++?
...