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
What does override mean in c++?
What is flush programming?
What is the extraction operator and what does it do?
Can there be at least some solution to determine the number of arguments passed to a variable argument list function?
Which programming language is best?
What are the rules for naming an identifier?
What is c++ virtual inheritance?
What is the protected keyword used for?
What does #define mean in c++?
Why do we use constructor?
Why are pointers not used in c++?
Can malloc be used in c++?
What are the two types of comments, and how do they differ?
What is c++ hiding?
How would you find out if a linked-list is a cycle or not?