please show work The designer of a class C mentions to you that he needs to add
ID: 3720806 • Letter: P
Question
please show work
The designer of a class C mentions to you that he needs to add a copy constructor to C.
Which of the following is almost certainly true?
C has const data members
C should have a destructor
C has const member functions
It is not currently possible to declare an array of C
It is not currently possible to declare a std::vector<C>
C has at least one public data membe
C has const data members
C should have a destructor
C has const member functions
It is not currently possible to declare an array of C
It is not currently possible to declare a std::vector<C>
C has at least one public data membe
Explanation / Answer
Answer:
C has const member functions, A function progresses toward becoming const when const catchphrase is utilized as a part of function's declaration. The possibility of const functions isn't enable them to adjust the protest on which they are called. It is prescribed practice to make whatever number functions const as would be prudent with the goal that unintentional changes to objects are stayed away from.
DEAR PLEASE DO RATE IT IF HELPS ELSE LET ME KNOW YOUR DOUBT.
THANK YOU!!
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.