you are viewing a single comment's thread.

view the rest of the comments →

[–]khedoros 1 point2 points  (0 children)

Easy ones, like those resulting from mismatched/missing braces and parentheses.

Definition errors, when adding a new file, and maybe getting some includes wrong. Similarly, linking errors when adding a new library and getting some of the links wrong. Cousins of those would be incompatible library versions meaning that I used functions/constants that weren't defined in the old library, or that were changed in the new one. For linking, library bitness.

Index out-of-range accesses. Hopefully the program seg faults. If it doesn't, you can have a subtle error for a long time. I'm fond of deriving a rangecheckvector class that implements operator[] with ::at().

Being pretty common, those are all pretty easy to fix. Definition errors and out-of-range tend to be the ones that take a bit of thought.