How to overload new operator in c++

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the three parts of a simple empty class?

1456


#include #include #include #include void select(char *items, int count); int main(void) { char s[255]; printf("Enter a string:"); gets(s); select(s, strlen(s)); printf("The sorted string is: %s.\n", s); getch(); return 0; } void select(char *items, int count) { register int a, b, c; int exchange; char t; for(a = 0; a < count-1; ++a) { exchange = 0; c = a; t = items[ a ]; for(b = a + 1; b < count; ++b) { if(items[ b ] < t) { c = b; t = items[ b ]; exchange = 1; } } if(exchange) { items[ c ] = items[ a ]; items[ a ] = t; } } } design an algorithm for Selection Sort

2064


Can a destructor be called directly?

599


What is destructor example?

593


What is polymorphism what is it for and how is it used?

572






What is multilevel inheritance explain with example?

623


What is the renewal class?

2161


What are the 4 pillars of oop?

667


Advantage and disadvantage of routing in telecom sector

783


Why is it so that we can have virtual constructors but we cannot have virtual destructors?

3825


If a=5, b=6, c=7, b+=a%c*2. What is the final value of b?

942


What is interface in oop?

659


What are oops functions?

583


what is the sylabus for priliminaries?

1684


What type of loop is a for loop?

682