C and C++ Gotchas
Static checking in C catches many potential errors at translation time that might otherwise become run-time errors. C++ applies even stricter checks to weed out more errors at translation time. Nonetheless, C and C++ programs can still have gotchas—constructs that compile and link without diagnostics, yet produce unintended, and often disastrous, run-time results. Gotchas also include portability problems whereby a program runs properly in one environment, yet fails in another. This paper explains why gotchas are an inherent part of C and C++. It presents several C and C++ programming examples containing gotchas and, when possible, recommends ways to avoid them.
Please disable any pop-up blockers for proper viewing of this Whitepaper.