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
How are virtual functions implemented in c++?
Explain the virtual inheritance in c++.
How do you establish a has-a relationship?
Can the operator == be overloaded for comparing two arrays consisting of characters by using string comparison?
Define anonymous class.
What is the use of volatile variable?
How do you clear a map in c++?
When do we use copy constructors?
What is the difference between prefix and postfix versions of operator++()?
What is class invariant in c++?
What is a far pointer? where we use it?
When should we use multiple inheritance?
What are the two types of polymorphism?
How do you establish an is-a relationship?
which operator is used for performing an exponential operation a) > b) ^ c) none