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
How do you decide which integer type to use?
Explain bubble sorting.
Evaluate the following expression as C++ would do :8 * 9 + 2 * 5 a) 82 b) 79 c) 370 d) list
How does code-bloating occur in c++?
Why isn't sizeof for a struct equal to the sum of sizeof of each member?
Difference between a copy constructor and an assignment operator.
Is it possible to use a new for the reallocation of pointers ?
What is a v-table?
What is the difference between a baller and a reference in C++?
What is iostream in c++ used for?
Describe delete operator?
Explain what happens when a pointer is deleted twice?
What does 7/9*9 equal ? a) 1 b) 0.08642 c) 0
What is the use of turbo c++?
Can you declare an array without a size in c++?