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

Exercise 8.12的答案 #44

Open
HypnoS-s opened this issue Sep 2, 2015 · 3 comments
Open

Exercise 8.12的答案 #44

HypnoS-s opened this issue Sep 2, 2015 · 3 comments

Comments

@HypnoS-s
Copy link

HypnoS-s commented Sep 2, 2015

C++ primer 5th Page 322.Exercise 8.12

Why didn’t we use in-class initializers in PersonInfo?

答案是

Cause we need a aggregate class here. so it should have no in-class initializers.

这里为什么需要aggregate class?
我觉得原因应该是没有必要这么做吧。

@Mooophy
Copy link
Contributor

Mooophy commented Sep 6, 2015

。。书上的PersonInfo 就已经是aggregate class了。

@huangmingchuan
Copy link

@Mooophy
我也看到这里了,为什么没有在 PersonInfo 类中使用类内初始化?

答案说我们需要聚合类,为什么需要聚合类呢?

@oiu850714
Copy link

這個情境下對 PersonInfo 做任何預設初始化應該都不合理?
給它一個預設號碼或名稱應該沒有意義

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

4 participants