Notes
This function is in beta test. Please help improve it in the issues
here.
UndefinedBehaviorSanitizer:DEADLYSIGNAL ==1044==ERROR: UndefinedBehaviorSanitizer: SEGV on unknown address 0x0000fec45130 (pc 0x7f8f574bd207 bp 0xffffffffffffff68 sp 0x7ffc696dc1e0 T1044) ==1044==The signal is caused by a READ memory access. #0 0x7f8f574bd206 (/lib/x86_64-linux-gnu/libc.so.6+0x97206) #1 0x7f8f5848b257 (/usr/lib/x86_64-linux-gnu/libstdc++.so.6+0x93257) #2 0x42c412 (/out/package/calc+0x42c412) #3 0x42c37e (/out/package/calc+0x42c37e) #4 0x42b8d2 (/out/package/calc+0x42b8d2) #5 0x42bfe4 (/out/package/calc+0x42bfe4) #6 0x7f8f57447b96 (/lib/x86_64-linux-gnu/libc.so.6+0x21b96) #7 0x403a29 (/out/package/calc+0x403a29) UndefinedBehaviorSanitizer can not provide additional info. ==1044==ABORTING
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
-1