Ben Chuanlong Du's Blog

And let it direct your passion with reason.

Common Mistakes in C++ Code and Ways to Debug

Debugging

  1. gdb is a excellent command tool for debugging C/C++ code.

Syntax Mistakes

  1. Missing "}". When this happens, you usually get lots of error message when you compile your code. And these error messages are often hard to understand and seems not related to your code.

  2. Missing template arguments. This …