class CTest
{
public:
void someMethod()
{
int nCount = 0;
cout << "This is some method --> " << nCount;
}
};
int main()
{
CTest *pctest;
pctest->someMethod();
return 0;
}
It will executes the someMethod() and displays the value
too. how is it possible with our creating memory for the
class . i think iam not creating object for the class.
Thanks in Advance...
Prakash
No Answer is Posted For this Question
Be the First to Post Answer
Name an advantage of linked list over array?
What is the renewal class?
write a c++ code of diagonal matrix.
what is difference between objects and function
What is a mixin class?
Is oop better than procedural?
In which cases you use override and new base?
//what is wrong with the programme?? #include<iostream.h> template <class first> class dd { first i; public: void set(); void print(); }; void dd< first>:: set() { cin>>i; } void dd< first>::print() { cout<<"\n"<<i; } void main() { dd <char>g; g.set(); g.print(); }
What is the real life example of polymorphism?
WRITE A SIMPLE C++ PROGRAM TO SWAP TWO NOS WITHOUT USING TEMP
What is the Advantage of Interface over the Inheritance in OOPS?
What is the difference between XML Web Services using ASMX and .NET Remoting using SOAP?