How to block a C ++ class is instantiated

(1) defines a useless abstraction function, such class an abstract class

(2) the constructor is defined as private.

 

Why do this?

Some tools, there is no need to be instantiated.

Guess you like

Origin www.cnblogs.com/Stephen-Qin/p/11514588.html