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 |
Who was the creator of c++?
What is do..while loops structure?
How do you flush std cout?
why and when we can declar member fuction as a private in the class?
You want to link a c++ program to c functions. How would you do it?
How is c++ different from java?
What is the use of dot in c++?
Explain virtual class?
Discussion on error handling of C++ .
Explain the register storage classes in c++.
What is type of 'this' pointer? Explain when it is get created?
i want to know how to copy arrary without using any method or function. I have tried the below using System; class e4 { static void Main(string[] args) { int a,b; int[ ] m= new int[5]; int[ ] n= new int[5]; for(a=0;a<=4;a++) { Console.WriteLine("enter any value"); m[a]=Convert.ToInt32(Console.ReadLine()); m[a]=n[a]; } for(b=0;b<=4;b++) { Console.WriteLine(n[b]); } } } but it will give wrong result can anyone solve this problem