avatar
微博上炸开锅了# Biology - 生物学
b*e
1
1. what is the diff between struct and class? my answer is member variable
in struct is public by default, but class is private, but the interviewer
usually isn't satisfied about this answer.
Is there any other diffs?
2. map用什么实现的?
3. 在构造函数中,在inialize list里初始化成员变量相比在函数体中初始化有什么好处?
4。什么类型的成员变量必须在inialize list中初始化,我回答reference type have to be inialized, what else?
avatar
s*l
2
输入密码之后一直停在哪里,continue没有反应。如何解决?
avatar
l*y
4
1. 还有的话就是inheritance一个public一个private by default. 别的都一样了吧?
2. stl map? 是一个balanced BST, look up time是 log(n)
avatar
z*e
5
重装。

【在 s****l 的大作中提到】
: 输入密码之后一直停在哪里,continue没有反应。如何解决?
avatar
f*y
6
1. member function also default to public.
3. initialization list also faster. One step only: it creates the variable
with the initial value. in function, it has two steps, you create the
variable with default value then need do the assignment.
4. const member variables.
avatar
v*n
7

2 RB tree, but u do not have to know the details about RB tree.

【在 l*******y 的大作中提到】
: 1. 还有的话就是inheritance一个public一个private by default. 别的都一样了吧?
: 2. stl map? 是一个balanced BST, look up time是 log(n)

avatar
h*k
8
如果需要调用基类的有参数的构造函数,也必须在initialization list里调用。

【在 f*****y 的大作中提到】
: 1. member function also default to public.
: 3. initialization list also faster. One step only: it creates the variable
: with the initial value. in function, it has two steps, you create the
: variable with default value then need do the assignment.
: 4. const member variables.

avatar
c*2
9
diff between struct and class: inheritance

好处?
have to be inialized, what else?

【在 b********e 的大作中提到】
: 1. what is the diff between struct and class? my answer is member variable
: in struct is public by default, but class is private, but the interviewer
: usually isn't satisfied about this answer.
: Is there any other diffs?
: 2. map用什么实现的?
: 3. 在构造函数中,在inialize list里初始化成员变量相比在函数体中初始化有什么好处?
: 4。什么类型的成员变量必须在inialize list中初始化,我回答reference type have to be inialized, what else?

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。