码迷,mamicode.com
首页 > 其他好文 > 详细

3014218152 林默涵 HW1

时间:2017-02-27 20:48:43      阅读:176      评论:0      收藏:0      [点我收藏+]

标签:pen   des   statement   appear   memory   exe   app   conf   oss   

What impressed me most is errors in the use of double linked list( C++ programming ). It occurs specially in the add or delete operations. I usually forget changes of pointers of one add/delete operation. In this process, the most important detail is the order of statements. Wrong order leads the loss of nodes or accessing the outer area which is beyond the array.

These errors first appeared after I executed the program when the operation system reminded me that the program is accessing the illegal memory and the prgram terminated. I was confused with the report. Therefore, I decided to set some variables in function to indicate when they change. Then I have no solution to localizing the fault. I had to spend much time in finding the fault. After that, I learned to set breakpoint, which is easy to localizing faults. What‘s more, most IDE has the debugging function which can report which statement is the fault leading the wrong accessing of memory.After the location was reveaded, the fault was fixed easily.

3014218152 林默涵 HW1

标签:pen   des   statement   appear   memory   exe   app   conf   oss   

原文地址:http://www.cnblogs.com/LmhInTju/p/6475842.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!