fork download
  1. #include <iostream>
  2. #include <array>
  3. using namespace std;
  4.  
  5. int main() {
  6. array<int, 9> arr;
  7. cout << arr.at(9);
  8. return 0;
  9. }
Runtime error #stdin #stdout #stderr 0s 15232KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
terminate called after throwing an instance of 'std::out_of_range'
  what():  array::at: __n (which is 9) >= _Nm (which is 9)