Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: finish homework2 #64

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

hebangwen
Copy link

  1. 两个指针会造成什么问题?循环引用,内存无法释放。
  2. 构造函数的改进?用初始化构造函数
  3. 应该输出13次,少了就是因为最开始的两个循环引用的指针。
  4. 深拷贝的实现:通过遍历指针得到整个链表保存的数据
  5. 为什么删除拷贝赋值函数也不报错?因为List b = a; 实际上调用的是拷贝构造函数,List b; b = a; 调用的才是拷贝复制函数,才会无法编译通过。
  6. print 函数有什么值得改进的?将值传递改为引用传递。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant