What was the most dangerous programming mistake you have made in C?

前端 未结 26 1548
南方客
南方客 2021-02-03 12:46

I am an intermediate C programmer. If you have made any coding mistake that you came to know later that it was the most hazardous / harmful to the total application please share

26条回答
  •  萌比男神i
    2021-02-03 13:40

    You should worry more about little mistakes. Big/spectacular mistakes are usually documented in books (with reasons why they are bad, alternative approaches etc.).

    It's the little design/coding mistakes that get to you, because they tend to add up.

    So my advice is to try and read the books Kernighan wrote or co-authored ("The C Programming Language", "Practice of Programming" etc.) because they are full of common-sense (common for experienced C programmers) advice and list principles that are very useful in avoiding both small and big mistakes.

    They also list many potential big mistakes, so they answer your initial question.

提交回复
热议问题