h*********y 发帖数: 49 | 1 Is there a way to print out its contents?
stack does not have iterator, does it infer that no way to access its other
element except the top one? | X****r 发帖数: 3557 | 2 Right.
If you want to iterate through elements in the stack without popping
them out, you should not have chosen stack as your data structure in
the first place.
other
【在 h*********y 的大作中提到】 : Is there a way to print out its contents? : stack does not have iterator, does it infer that no way to access its other : element except the top one?
|
|