s*****r 发帖数: 773 | 1 怎么看到一个说法是vector holds objects of various types.
难道每个元素可以不一样么? |
k****f 发帖数: 3794 | 2 stl的vector当然不行的
【在 s*****r 的大作中提到】 : 怎么看到一个说法是vector holds objects of various types. : 难道每个元素可以不一样么?
|
c*********n 发帖数: 128 | 3 It means you can define vector, in which obj could be various types.
E.g. vector is a vector of int, while vector is a vector of
chicks.
However, for a particular vector you defined, all the elements have to
be of type obj, i.e. vector only holds chicks.
【在 s*****r 的大作中提到】 : 怎么看到一个说法是vector holds objects of various types. : 难道每个元素可以不一样么?
|
j****g 发帖数: 597 | 4 how about subclass of chick? |
t****t 发帖数: 6806 | 5 of course not
【在 j****g 的大作中提到】 : how about subclass of chick?
|