The Name of a Built-In Array Is Not Modifiable

The expression

b += 3

causes a compilation error, because it attempts to modify the value of the built-in array’s name with pointer arithmetic.

Image Good Programming Practice 8.2

For clarity, use built-in array notation instead of pointer notation when manipulating built-in arrays.

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.