Answer Posted / brainless
If compilers don't check your pointers strictly,
you can also write code as below,
class A
{
//some static function code here
//never access non-static attributes here
static void callMe() {}
};
int main()
{
A * inst = NULL;
(*inst).callMe();
}
Is This Answer Correct ? | 1 Yes | 2 No |
Post New Answer View All Answers
Who invented turbo c++?
What is searching? Explain linear and binary search.
What kind of problems can be solved by a namespace?
Can you please explain the difference between static and dynamic binding of functions?
What are multiple inheritances (virtual inheritance)?
What is scope in c++ with example?
What are its advantages and disadvantages of multiple inheritances (virtual inheritance)?
What is enum class in c++?
What is polymorphism and its type in c++?
Is c++ a float?
What is the use of pointer in c++ with example?
What is the best it certification?
How can you quickly find the number of elements stored in a static array?
Describe private, protected and public – the differences and give examples.
What does I ++ mean in c++?