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
Are strings immutable in c++?
If a function doesn’t return a value, how do you declare the function?
What problems might the following macro bring to the application?
What things would you remember while making an interface?
If dog is a friend of boy, is boy a friend of dog?
What are default parameters? How are they evaluated in c++ function?
What is the type of 'this' pointer? When does it get created?
What are the four main data types?
How do you clear a buffer in c++?
Is c++ a good first language to learn?
What is the copy-and-swap idiom?
What is a class template in c++?
Why we use #include conio h in c++?
What is array in c++ pdf?
Write my own zero-argument manipulator that should work same as hex?