首页 > 代码库 > 3014218152 林默涵 HW1

3014218152 林默涵 HW1

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