Notes
This function is in beta test. Please help improve it in the issues
here.
================================================================= ==70594==ERROR: LeakSanitizer: detected memory leaks Direct leak of 48 byte(s) in 1 object(s) allocated from: #0 0x7f743eb1f448 in operator new(unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xe0448) #1 0x5576dadb953a in Station::busCome(Bus, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) (/out/package/ex3+0xf53a) #2 0x5576dadbd5b4 in main (/out/package/ex3+0x135b4) #3 0x7f743d3adb96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96) SUMMARY: AddressSanitizer: 48 byte(s) leaked in 1 allocation(s).
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! Bus K1 comes!
JOJ Answer
Welcome to the station! Current number of buses: 0 Error: Station is empty! Bus K1 comes!