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
Is nan a c++?
What is the difference between a type-specific template friend class and a general template friend class?
Do you know about C++ 11 standard?
What is the difference between the indirection operator and the address of oper-ator?
What relational operators if statements in c++?
Why is c++ considered difficult?
What are keywords in c++?
How would you use the functions sin(), pow(), sqrt()?
Why c++ is called oop?
Explain class invariant.
What do you mean by overhead in c++?
What is c++ try block?
What is void pointer in c++ with example?
Why is c++ still best?
What does new do in c++?