Notes
This function is in beta test. Please help improve it in the issues
here.
/in/ex1.h:13:20: runtime error: index 142 out of bounds for type 'int [100]' /in/ex1.h:13:22: runtime error: store to address 0x7fff76c62128 with insufficient space for an object of type 'int' 0x7fff76c62128: note: pointer points here 50 62 00 00 e0 12 00 00 50 62 00 00 00 21 00 00 50 62 00 00 6b 8f 3e 5b af 7f 00 00 78 38 64 5b ^ ASAN:DEADLYSIGNAL ================================================================= ==26102==ERROR: AddressSanitizer: SEGV on unknown address 0x00009fff8025 (pc 0x5638752bba21 bp 0x7fff76c61e60 sp 0x7fff76c61e50 T0) ==26102==The signal is caused by a READ memory access. #0 0x5638752bba20 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::size() const (/out/package/ex1+0x10a20) #1 0x5638752ba48b in __gnu_cxx::__enable_if<std::__is_char<char>::__value, bool>::__type std::operator==<char>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<c
Hints
Your answer may be identical to the JOJ answer in the first several lines.
However, the main problem you meet now is Runtime Error. And the exit code of your program is 1, which should be 0.
Please double check your code to solve this problem and try again.
Your Answer
JOJ Answer
inches