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
what is data encapsulation in C++?
What is a character in c++?
Do vectors start at 0?
Is java the same as c++?
What is size_type?
What does floor mean in c++?
Which is the best c++ compiler for beginners?
Define macro.
Tell me difference between constant pointer and pointer to a constant.
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?
int age=35; if(age>80) {Console.WriteLine("Boy you are old");} else {Console.WrieLine("That is a good age");}
What is the difference between global int and static int declaration?
What are the 4 types of library?
How does class accomplish data hiding in c++?
Am studying basic c++ programming, have been given the following assignment. Design a linear program to calculate the maximum stress a material can withstand given a force and a diameter of a circle. To find the required area pi should be defined. Have most of the program sorted out but am at a loss as to how to show the calculations required. Can anyone help?