Quick Q: Vector going out of bounds without giving error

Save to:
Instapaper Pocket Readability

Quick A: Welcome to undefined behaviour.

Recently on SO:

Vector going out of bounds without giving error

STL vectors perform bounds checking when the .at() member function is called, but do not perform any checks on the [] operator.

When out of bounds, the [] operator produces undefined results.

Add a Comment

You must sign in or register to add a comment.

Comments (0)

There are currently no comments on this entry.