例如
class A { public: A() { int *a; a = new int; } };
这种情况下无法访问新创建的变量。
(已解决)只在构造函数中声明的变量的生命周期
原文:https://www.cnblogs.com/ljt0811/p/11806834.html