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 |
What do you mean by funtion prototype?
Difference between strdup and strcpy?
What are pointers, when declared, intialized to a) NULL b) Newly allocated memory c) Nothing. Its random
wrong statement about c++ a)code removably b)encapsulation of data and code c)program easy maintenance d)program runs faster
Can I learn c++ without knowing c?
Define the process of error-handling in case of constructor failure?
can output 5 students using one dimensional array
What is lazy initialization in c++?
Can I have a reference as a data member of a class? If yes, then how do I initialise it?
In c++, what is the difference between method overloading and method overriding?
Problem 5: Hero's Formula is A method for calculating the area of a triangle when you know the lengths of all three sides. Let a, b, c be the lengths of the sides of a triangle. The area is given by:A= pp-ap-b(p-c) | wherep= a+b+c2 | | Write a C-language code to calculate area of triangle using above method. Take the three lengths of the triangle from the user and display the area that your program calculates.
write a C++ programming using for loop: * * * * * * * * * *