Notes
This function is in beta test. Please help improve it in the issues
here.
/in/exam3_matrix.cpp:10:30: runtime error: store to misaligned address 0x7f581376381e for type 'int', which requires 4 byte alignment 0x7f581376381e: note: pointer points here 49 89 c3 b8 ee 00 00 00 31 d2 0f ae 6c 24 40 4c 8b 4c 24 30 4c 8b 44 24 28 48 8b 7c 24 20 48 8b ^ ASAN:DEADLYSIGNAL ================================================================= ==31305==ERROR: AddressSanitizer: SEGV on unknown address 0x7f581376381e (pc 0x5642094f1b5f bp 0x7ffe29d27aa0 sp 0x7ffe29d27a60 T0) ==31305==The signal is caused by a WRITE memory access. #0 0x5642094f1b5e in intMatrix::intMatrix(int, int, int) (/out/package/ex3+0x16b5e) #1 0x5642094eb9df in main (/out/package/ex3+0x109df) #2 0x7f58110ffb96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96) #3 0x5642094e9f29 in _start (/out/package/ex3+0xef29) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV (/out/package/ex3+0x16b5e) in intMatrix::intMatrix(int, int, int) ==31305==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
Testing getElement 1: 3pts
JOJ Answer
Testing getElement 1: 3pts Matrix Information: rows: 7 cols: 7 Matrix[1][1] = 999