Redian新闻
>
冬天室内能种番茄不?
avatar
冬天室内能种番茄不?# gardening - 拈花惹草
c*e
1
You have a class that many libraries depend on. Now you need to modify the
class for one application. Which of the following changes require
recompiling all libraries before it is safe to build the application?
a) add a constructor
b) add a data member
c) change destructor into virtual
d) add an argument with default value to an existing member function
This is an old question. I believe that it was discussed before. But I am
still not sure about its answer.
avatar
B*d
2
温度合适的呀
avatar
w*r
3
c

【在 c**********e 的大作中提到】
: You have a class that many libraries depend on. Now you need to modify the
: class for one application. Which of the following changes require
: recompiling all libraries before it is safe to build the application?
: a) add a constructor
: b) add a data member
: c) change destructor into virtual
: d) add an argument with default value to an existing member function
: This is an old question. I believe that it was discussed before. But I am
: still not sure about its answer.

avatar
y*8
4
现在正是室外种西红柿的大好时机,怎么想起冬天室内种番茄的事情的呢。呵呵。
avatar
t*j
5
选c是因为会改变其他子类的vtable,所以要重编译,对吗?
avatar
h*i
6
我觉得光足够的话应该就可以,比如有那种窗户又大又多的sun room,或者有那种很厉
害的grow lamp,不过我冬天在屋里种herbs都不好,即使用了150w的grow lamp都种不
好,本来好好的香菜和香葱越长就越长越细
avatar
n*n
7
因为abd都不对。

【在 t*****j 的大作中提到】
: 选c是因为会改变其他子类的vtable,所以要重编译,对吗?
avatar
B*d
8
那不是一年四季都想吃到新鲜的西红柿么

【在 y*****8 的大作中提到】
: 现在正是室外种西红柿的大好时机,怎么想起冬天室内种番茄的事情的呢。呵呵。
avatar
s*a
9
b
avatar
i*e
10
我种过,一定要朝阳大窗,不过我只试过cherry 的, 大的没种,收成还行,好在番茄
喜干,不用加湿。
avatar
s*a
11
add data member will change the memory size of the object. and even
arrangement of the data member.
avatar
t*j
12
其实我也倾向选b。呼唤正确答案!

【在 s****a 的大作中提到】
: add data member will change the memory size of the object. and even
: arrangement of the data member.

avatar
m*n
13
如果这个class原来没有virtual function, 现在加了一个,object size也是变化的因为多了
vtable,这样和b的情况一样了。
avatar
c*e
14
呼唤xnxky and thrust两位高手!

【在 t*****j 的大作中提到】
: 其实我也倾向选b。呼唤正确答案!
avatar
s*n
15
C++必须转化成C.如果数据变了对于其他lib没有任何影响,不需要重新compile,ld.
但是函数的signature变了。则必须重新编译才能知道正确的接口。所以只能是b.

【在 s****a 的大作中提到】
: add data member will change the memory size of the object. and even
: arrangement of the data member.

avatar
t*j
16
我觉得我思路可能错了,vtable应该是实例中才有的,也就是运行时候才有,和编译没
有关系。
这么排除下来应该还是b。

的因为多


【在 m*****n 的大作中提到】
: 如果这个class原来没有virtual function, 现在加了一个,object size也是变化的因为多了
: vtable,这样和b的情况一样了。

avatar
d*e
17
http://www.mitbbs.com/bbsann2/life.faq/JobHunting/17/D12842543542i0/M.1284348203_2.70/%CE%CA%B8%F6C%2B%2B%D6%D8%D0%C2%B1%E0%D2%EB%B5%C4%CE%CA%CC%E2

【在 c**********e 的大作中提到】
: You have a class that many libraries depend on. Now you need to modify the
: class for one application. Which of the following changes require
: recompiling all libraries before it is safe to build the application?
: a) add a constructor
: b) add a data member
: c) change destructor into virtual
: d) add an argument with default value to an existing member function
: This is an old question. I believe that it was discussed before. But I am
: still not sure about its answer.

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