How to avoid a class from instantiation?

Answer Posted / achal

Making a constructor private is perfectly legal.
But now u can't create instance of that class.

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between a baller and a reference in C++?

578


Can I learn c++ without learning c?

563


If dog is a friend of boy and boy is a friend of house, is dog a friend of house?

555


What are the 4 types of library?

600


What is flush () in c++?

580






Is c better than c++?

620


Out of fgets() and gets() which function is safe to use and why?

727


What is the difference between an external iterator and an internal iterator? Describe an advantage of the external iterator.

565


Does c++ have a hash table?

546


What is c++ manipulator?

555


What is the latest c++ standard?

688


Explain friend class?

634


What are proxy objects in c++?

645


What are the differences between java and c++?

531


Describe delete operator?

625