bounds checking
Checking an index is valid before using it.
c[i] performs no bounds check and an out-of-range index is undefined behavior; c.at(i) checks and throws std::out_of_range.
Checking an index is valid before using it.
c[i] performs no bounds check and an out-of-range index is undefined behavior; c.at(i) checks and throws std::out_of_range.