栈内存: 读取速度快,仅次于寄存器。但生命周期有限,局部变量 堆内存: 在堆内存中创建:需要new关键字student * p1 = new student(); 要记得delete p1 不记得释放内存会使内存溢出,造成灾难