warning: if statement has empty body [-Wempty-body]
可能句末多打了分號。
warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
leetcode編譯器不允許在括號內賦值。
runtime error: index -2 out of bounds for type 'vector<p> [10010]' (solution.cpp)
下標越界。(不一定是大於上限,可能是小於0了。)
add explicit braces to avoid dangling else [-Wdangling-else]
添加括號以避免不必要的錯誤。(括號前后不對齊,比如有3個“(”卻只有2個“)”。)
error: member reference type 'TreeNode *' is a pointer; did you mean to use '->'?
類型出錯。
error: reference to 'end' is ambiguous
可能和庫中變量名重復了。
error: indirection requires pointer operand ('int' invalid)
我引發這個錯誤的原因是遞歸忘了返回,指針會指到空值。
ERROR: AddressSanitizer: heap-buffer-overflow on address 0x602000000078 at pc 0x00000034c175 bp 0x7ffff3521b00 sp 0x7ffff3521af8
我引發這個錯誤的原因是數組越界。