Off-By-One Errors

If you incorrectly wrote counter < 10 as the loop-continuation condition in Fig. 5.2, then the loop would execute only 9 times. This is a common off-by-one error.

Get C++11 for Programmers, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.