Record Case Detail

Notes

This function is in beta test. Please help improve it in the issues here.

Stderr

ASAN:DEADLYSIGNAL
=================================================================
==70634==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7fe1f986d634 bp 0x7ffd2a4c7cf0 sp 0x7ffd2a4c7460 T0)
==70634==The signal is caused by a READ memory access.
==70634==Hint: address points to the zero page.
    #0 0x7fe1f986d633  (/usr/lib/x86_64-linux-gnu/libasan.so.4+0x79633)
    #1 0x556f96b2bc8d in std::char_traits<char>::copy(char*, char const*, unsigned long) (/out/package/ex3+0x14c8d)
    #2 0x556f96b2e0a9 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_copy(char*, char const*, unsigned long) (/out/package/ex3+0x170a9)
    #3 0x556f96b2cd4e in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator=(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&) (/out/package/ex3+0x15d4e)
    #4 0x556f96b2c05f in _node::operator=(_node&&) (/out/package/ex3+0x1505f)
    #5 0x556f96b2a174 in Station::bus

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

Welcome to the station!
Current number of buses: 0
Error: Station is empty!

JOJ Answer

Welcome to the station!
Current number of buses: 0
Error: Station is empty!
Bus K1 comes!