Answer Posted / reejusri
Static function is basically used in creating factory
objects.
You can make your constructor private and expose static
function. And user can use the static methods to create the
object of that class.
Using NONSHARABLE_CLASS you can restrict the usage of
static functions/method also.
Is This Answer Correct ? | 15 Yes | 16 No |
Post New Answer View All Answers
What is a responder chain?
Explain container class.
What is the difference between a baller and a reference in C++?
Write a program to interchange 2 variables without using the third one.
What are keywords in c++?
Why cstdlib is used in c++?
Is java a c++?
what is scupper?
Explain unexpected() function?
What is the function to call to turn an ascii string into a long?
Will c++ be replaced?
Describe the syntax of single inheritance in C++?
What are exceptions c++?
What are the two main components of c++?
What is a pointer how and when is it used?