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
though the ascii is called 7-bit code. why do we use 8-bits to represent a character?



The #undef Directive This directive undefines a previously explained macro. For, example the following will give an error since PI is undefined.                 #define PI 3


need an expert programmer to finish coding the requirements from the assignment withen 4 hrs

programme for time table in c++

Implementation of the Definition class: void Definition::put_word(char *s) {    word = new char[strlen(s)+1];    strcpy(word,s);    nmeanings = 0; }   voi

In this problem you are given a board in which some of the elements are placed as shown in diagram below. Each element represents a color. Fill the other elements in the board, suc

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 #include float start_point,