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

面试高频算法真题-简单工厂模式-Product类析构有误 #150

Open
GongSX98 opened this issue Mar 23, 2024 · 0 comments
Open

面试高频算法真题-简单工厂模式-Product类析构有误 #150

GongSX98 opened this issue Mar 23, 2024 · 0 comments

Comments

@GongSX98
Copy link

Product类的析构函数不能定义为纯虚函数,编译会报错,应该定义为正常的虚函数即可
修改前:
virtual ~Product() = 0;
修改后:
virtual ~Product() = default;

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