Can we have a private constructor ?
Answer Posted / ashwini
Yes, We can.
By doing so, we can create only single instance of the
class.(singleton)
Is This Answer Correct ? | 0 Yes | 6 No |
Post New Answer View All Answers
What are two types of polymorphism?
hi, this is raju,iam studying b.tech 2nd year,iam want know about group1 and group2 details, and we can studying without going to any instutions? please help me.
What is object in oop?
What is destructor example?
What is inheritance and how many types of inheritance?
can inline function declare in private part of class?
What does I oop mean?
Write a program to reverse a string using recursive function?
Can destructor be overloaded?
Whats oop mean?
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
What is the point of oop?
What are the benefits of polymorphism?
Why multiple inheritance is not possible?
i am getting an of the type can not convert int to int *. to overcome this problem what we should do?