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 |
Why should you learn c++?
What is ios :: in in c++?
What is prototype for that c string function?
What is vectorial capacity?
What is c++ vb?
Differentiate between an array and a list?
What is scope of a variable? (LOLZ)
Why do we use using namespace std in c++?
Where Malloc(), Calloc(), and realloc() does get memory?
What is the equivalent of Pascal's Real a) unsigned int b) float c) char
Define precondition and post-condition to a member function?
What are dynamic type checking?