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 |
Explain the difference between c++ and java.
What is general form of pure virtual function? Explain?
What is a catch statement?
What is virtual destructors? Why they are used?
Is eclipse good for c++?
What does it mean to declare a member variable as static?
Can we declare destructor as static? Explain?
Write a single instruction that will find the remainder of integral division when x is divided by y. Have the answer stored in z.
What is the exit function in c++?
When must you use a pointer rather than a reference?
When is dynamic checking necessary?
Why can you not make a constructor as const?