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 c++ is used for?
When should I use unitbuf flag?
What is using namespace std in cpp?
How c functions prevents rework and therefore saves the programers time as wel as length of the code ?
What is class definition in c++ ?
How do you define/declare constants in c++?
What are special characters c++?
What is ios flag in c++?
total amount of milk produced each morning and then calculates and outputs the number of cartons needed for this milk , the cost of producing the milk and the profit from producing this milk.
What is ostream in c++?
What is pure virtual function?
What is == in programming?
What are the benefits of c++?
What is std :: flush?
What is the maximum value of a unsigned char a) 255 b) 256 c) 128