Segmentation Fault of the Dynamic Allocated Memory
学习C++ ing, 其中引用和指针数据类型于我而言有位复杂。
程序测试目标:program新建临时变量存进stack中,并使用delete方法删除指针。
#include <iostream>
using namespace std;
class X{
public:
X() = default;
X(int n){
std::cout<<"in Class X:";
std::cout<< n<
原创
2021-09-01 19:58:44 ·
97 阅读 ·
0 评论