Can we have a private constructor ?
Answer Posted / ravi`
no,
we can not make a constructor private , if we make a
constructor private its method cannot access in main method .
| Is This Answer Correct ? | 17 Yes | 136 No |
Post New Answer View All Answers
What is oops and its features?
What does <> mean pseudocode?
what is difference between class template and template class?
Why is polymorphism important in oop?
Plese get me a perfect C++ program for railway/airway reservation with all details.
What is and I oop mean?
write knight tour problem which is present in datastructure
What is polymorphism and its types?
class CTest { public: void someMethod() { int nCount = 0; cout << "This is some method --> " << nCount; } }; int main() { CTest *pctest; pctest->someMethod(); return 0; } It will executes the someMethod() and displays the value too. how is it possible with our creating memory for the class . i think iam not creating object for the class. Thanks in Advance... Prakash
Explain the concepts involved in Object Oriented programming.
write a code for this:trailer recordId contains a value other than 99, then the file must error with the reason ‘Invalid RECORD_ID’(User Defined Exception).
What are the 4 pillars of oop?
What is the difference between a mixin and inheritance?
Following are the class specifications: class {int a}; class {int b}; Using friend funtion,calculate the max of two objects and display it.
Templates mean