摘要:
c++中的默认的拷贝函数,会把所有属性都给拷贝。 现在假如有个指针型 比如 int* height 数据 当我们在有参函数中使用了这么个语句: Person(int h) { height=new int (h); //height是属性 定义是 int*height } 这条语句 由我们自己开辟了 阅读全文
posted @ 2022-02-06 12:51
航天品质的纯牛奶
阅读(27)
评论(0)
推荐(0)