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
Describe protected access specifiers?
What is the use of class in c++?
Can a program run without main function?
What is long in c++?
What is the error in the code below and how should it be corrected?
Is c++ an integer?
what is c++
Can a class be static in c++?
Why is polymorphism useful?
What are static and dynamic type checking?
What does h mean in maths?
What is the basic of c++?
What are formatting flags in ios class?
What is an adjust field format flag?
What are smart pointers?