| High Integrity CPP Rule 17.9 | Use vector and string in place of dynamically allocated arrays. |
| Justification |
vector and string automatically manage their storage requirements so the programmer does not need to manage dynamically allocated memory. This removes the potential for inefficiency and memory related bugs that can occur with dynamically allocated arrays. vector and string contain commonly needed operations and are interoperable with STL algorithims so programmers can avail themselves of a large body of efficient and reliable code. |
| See also |
Rule 8.4.9 |
| Reference |
Effective STL Item 13; |