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

提供一个构造函数的那些事儿 #342

Open
ks002278 opened this issue May 10, 2024 · 0 comments
Open

提供一个构造函数的那些事儿 #342

ks002278 opened this issue May 10, 2024 · 0 comments

Comments

@ks002278
Copy link

c++ 要实现一个类,其构造函数该怎么写?
是否必须要重构构造函数?需要重构多少个构造函数?是否需要拷贝构造,拷贝赋值,移动构造,移动赋值?
如果一个类里成员复杂,有基本类型,有自定义类型,有指针类型,有引用类型,等等。这样的一个复杂的类,怎么正确实现其构造函数,麻烦总结一下呗

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

No branches or pull requests

1 participant