With stl::vector:
vector v(1);
v[0]=1; // No bounds checking
v.at(0)=1; // Bounds checking
Is there a way to disable bounds checking
Not a standard way. You could turn off exceptions in your compiler. You can do this with gcc with -fno-exceptions
.
You should be wary of doing this though; your libraries (including the standard libraries) might not play nicely with exceptions turned off. Check your documentation, and threads like this one on the gcc mailing list.