I am coming from Java and learning C++ in the moment. I am using Stroustrup\'s Progamming Principles and Practice of Using C++. I am working with vectors now. On page 117 he
C and C++ does not always do bounds checks. It MAY cause a runtime error. And if you were to overdo your number by enough, say 10000 or so, it's almost certain to cause a problem.
You can also use vector.at(10), which definitely should give you an exception. see: http://www.cplusplus.com/reference/vector/vector/at/ compared with: http://www.cplusplus.com/reference/vector/vector/operator%5B%5D/