- 博客(1)
- 收藏
- 关注
原创 Leetcode报错:runtime error: member access within null pointer of type ‘struct ListNode‘ (solution.c)
在做一道链表题后,我发现了以下报错: runtime error: member access within null pointer of type 'struct ListNode' (solution.c) 然后上网查阅资料得到这是空指针的问题,即编译器不知道你正在使用的是不是空指针中的元素 而当时出问题的代码为 while(fast->next&&fast) 其中fast是一个结构体指针变量 这里的问题实际上是,编译器会优先处理fast->nex...
2020-07-11 12:33:25
4010
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人