3 ms·
> vector::operator[] does not check bounds True, but modern C++ encourages the use of range based for loops and std::algorithm functions which are safer to use
by AlexeyBrin 7y ago
> vector::operator[] does not check bounds
True, but modern C++ encourages the use of range based for loops and std::algorithm functions which are safer to use.
Also, if you want to check for bounds use std::vector::at which checks for bounds at runtime.