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 |
Search for: what is pair in c++?
What is virtual destructors? Why they are used?
To which numbering system can the binary number 1101100100111100 be easily converted to?
What is endianness?
Can a program run without main in c++?
List out function which we can call without using object
What is a "Copy Constructor"?
What is a friend function in c++?
Explain about Garbage Collector?
What is dynamic and static typing?
How would perform Pattern Matching in C++?
Explain the differences between list x; & list x();.