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
Describe delete operator?
how to access grid view row?
Define a nested class. Explain how it can be useful.
Explain operator overloading.
What is static function? Explain with an example
When are exception objects created?
Which recursive sorting technique always makes recursive calls to sort subarrays that are about half size of the original array?
Explain about vectors in c ++?
What is private inheritance?
Are there interfaces in c++?
Is map sorted c++?
What is a .lib file in c++?
How many types of modularization are there in c++?
Where the memory to the static variables is allocated?
Can turbo c++ run c program?