Files
912-notes/c++ note/common_bugs.md
2019-05-21 14:02:50 +08:00

8 lines
457 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
Some Common Bugs
================
为了更好的debug我觉得还是有必要把平时出现的有点难度的bug记录下来以让自己知道你自己写的究竟是些啥
> 在调用了构造函数,进行了必要的初始化,之后的操作却出现了空指针?
因为我嵌套调用了构造函数。在构造函数中调用其他构造函数,只会产生一个匿名的对象,并不会帮助你初始化当前的对象。