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
how to tackle technical questions
What is object in oop?
What are two types of polymorphism?
What are the data types in oop?
What is nutshell in programming language?
1 Answers Satyam, Tech Mahindra,
write a code for this. serial_number contained in the header of the file will be read , if this serial number is less than a previous serial number within a successfully processed file, or is the same as another serial number within a successfully processed file, or if the field contains anything other than 7 digits, then the file must error with the reason ‘Invalid SERIAL_NUMBER’.
What is a friend function & its advantage?
Why do we use class?
Why do we need oop?
what is difference b/w object based and object oriented programming language?
18 Answers Chaitanya, College School Exams Tests, Educomp, IBM, Infosys, Telko,
the difference between new and malloc
We have a scale and 7 balls. 1 ball is heavier than all the rest. How to determine the heaviest ball with only 3 possible weighing attempts?