How to overload new operator in c++

Answers were Sorted based on User's Feedback



How to overload new operator in c++..

Answer / r.ramakrishna

We want use the new operator in overloading by defining the
new()operator with the fallowing operation in the class.

Is This Answer Correct ?    3 Yes 2 No

How to overload new operator in c++..

Answer / guest

class[] ob=new class[5];
ob[1]= new class();
ob[2]= new class();
ob[3]= new class();
ob[4]= new class();
ob[5]= new class();

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More OOPS Interview Questions

what is difference between thread and programme.

1 Answers   NCC,


tel me oops defination in single line

2 Answers  


What is inheritance and how many types of inheritance?

0 Answers  


when my application exe is running nad i don't want to create another exe what should i do

2 Answers   HCL,


How to call a non virtual function in the derived class by using base class pointer

3 Answers   HCL,






all about pointers

2 Answers  


What is public, protected, private?

6 Answers   IBS, Satyam,


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

0 Answers  


Can we have inheritance without polymorphism?

0 Answers  


can inline function declare in private part of class?

1 Answers  


Can we create object of abstract class?

0 Answers  


what is namespace? what are the uses of namespace?

1 Answers  


Categories