Line 1033: Char 34: runtime error: applying non-zero offset 18446744073709551612 to null pointer (st

Problem description: In C++, matrix.size() == 0 && matrix[0].size() == 0 is used to judge whether a two-dimensional array is empty.

Reason: If C++ is in the form of [[]], matrix[0].size() is already an out-of-bounds access to the array, and it will be judged to reuse matrix.size() == 0 || matrix[0].size( ) == 0

Guess you like

Origin blog.csdn.net/qq_34612223/article/details/113761404