# C++ Notes: Arrays - Programmer Difficulties

## Common programmer errors

Some common array programming mistakes are:

- Forgetting that array subscripts start with zero.
- Forgetting that the maximum subscript is one less than the size of the array. The result is often subscripting outside an array. C++ doesn't check to be sure the subscript you use is in a legal range, you must do that. The most common problem is to subscript one too many.
- Not initializing the array elements. All array elements start with some left-over (garbage from a previous program) value in them.