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
List the merits and demerits of declaring a nested class in C++?
What is #include math h in c++?
What does #define mean in c++?
Explain the uses of static class data?
Explain what data encapsulation is in c++?
Is map sorted c++?
How do you add an element to a set in c++?
What is iostream in c++ used for?
Why is that unsafe to deal locate the memory using free( ) if it has been allocated using new?
What are the extraction and insertion operators in c++? Explain with examples.
If a round rectangle has straight edges and rounded corners, your roundrect class inherits both from rectangle and from circle, and they in turn both inherit from shape, how many shapes are created when you create a roundrect?
Write a program in c++ to print the numbers from n to n2 except 5 and its multiples
why is c++ called oops? Explain
Am pass the 10000 records to target in target I will take commit interval 15000 when I was stop the work flow what will happened
What are activex and ole?