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
any ideas? any reason of it?
Thanks!
k****l 发帖数: 23
2
d
h*****u 发帖数: 38
3
d. add an argument with default value to an existing member function
有default value的 Will be fine as long as you don't change the function
itself
c?
m*******n 发帖数: 305
4
I would say C because it changed the signature of the function.
D adds new entries into the interface. It would not alter already existing
functions.