Write a 600 line of small jobs debug time a little feelings, be prepared to do something right for the big job

First, make sure there really is an array subscript the ...... While it is very true but mentally it harms
Secondly, the most important point, size, and a pointer to the object of the size of an object is not the same! This in vs2017 which were ignored, and then reflected out in Dev, the qsort function there is a problem
there, when the object is constructed, all the pointers are to the beginning, the beginning, of!
In addition, multiple sets of data input, remember to re global variables! early! beginning! Of! ! ! This should be put first, when they are written for each of Warcraft ** emergence of this mistake
all the places to use the pointer, should confirm whether the pointer is empty!
Programming is really a need for careful work, rough coarse hair problems before being brought over the last entrap or their own, debug two days have not de done.
Always stop working.
Well ultimate solution: I put all the delete statements all deleted, memory leak to leak, and I come to find out this summer Editor's Note.

Guess you like

Origin blog.csdn.net/weixin_44288817/article/details/88668365