Live example for static function?
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 |
What are the differences between a struct in C and in C++?
What are the rules for naming an identifier?
Can we define function inside main in c++?
Why do we need function?
Briefly describe a B+ tree. What is bulk loading in it?
Why c++ is not a pure oop language?
How to declare an array of pointers to integer?
How many static variables are created if you put one static member into a template class definition?
What is a "RTTI"?
Compare compile time polymorphism and Runtime polymorphism
What is the difference between method and message?
Explain shallow copy?