What if one forget the [] when deleteing array allocated , C/C++ Programming

What if one forget the [] when deleteing array allocated through new T[n]?

A: All life comes to a disastrous end.

It is the programmer's responsibility not the compiler's to get the connection among new T[n] and delete[] p correct. If you get it incorrect, neither a compile-time nor a run-time error message will be generated through the compiler. Heap corruption is a likely result. Or worse. Your program will die probably.

 

Posted Date: 3/19/2013 8:43:19 AM | Location : United States







Related Discussions:- What if one forget the [] when deleteing array allocated , Assignment Help, Ask Question on What if one forget the [] when deleteing array allocated , Get Answer, Expert's Help, What if one forget the [] when deleteing array allocated Discussions

Write discussion on What if one forget the [] when deleteing array allocated
Your posts are moderated
Related Questions
Pls i only need help with program 2. #include #include using namespace std; int main() { int FilingStatus; cout cout cout cout cout cout

Define Multi File Program? While writing large programs we must divide programs up into modules. These would be separate source files and the main() function would be in one fi

1 Aims The main purpose of the assignment is to let you practice the following programming techniques: perform operations on pointers to basic and more complex types;

Default Value Functions,  When declaring a function we can specify a default value for each parameter. This value will be used if that parameter is left blank when calling to the f

Program is to find the area of room: Program is to find the area of room with default values using classes & object class room   {   private:     int len;     i

Program for Hangman Problem   #include   #include   #include   #include   #include   static void playGame();   static void printMistakes(int n);   st

Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve between two points can b

Byteland county is very famous for luminous jewels. Luminous jewels are used in making beautiful necklaces. A necklace consists of various luminous jewels of particular colour. Nec

Demonstration using Moss Open Source Machine Translation Project Description: Moses is an open source Statistical Machine Translation System. I need someone to provide me a d

Program is to search for a given character in a string: Program is to search for a given character in a string and print point of match char *stsearch(char *string, char sea