Answer Posted / sachinmundhra
Live Example for static function is Singleton class.
Static Method is used and called to get the instance of
class.
class Base
(
private:
Base()
public:
static Base* GetObject() // This is a static method
};
| Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
What is object in c++ example?
Describe delete operator?
Why struct is used in c++?
What is the error in the code below and how should it be corrected?
Is java a c++?
What is data types c++?
Write a struct time where integer m, h, s are its members?
What does override mean in c++?
What is a dynamic binding in c++?
Can you use the function fprintf() to display the output on the screen?
What is the benefit of learning c++?
Will the following program execute?
How would you obtain segment and offset addresses from a far address of a memory location?
Tell me difference between constant pointer and pointer to a constant.
Difference between pointer to constant vs. Pointer constant