What is the difference between const_iterator and non-const iterator in the C++ STL?

后端 未结 7 1966
灰色年华
灰色年华 2020-11-28 19:00

What is the difference between a const_iterator and an iterator and where would you use one over the other?

相关标签:
7条回答
  • 2020-11-28 19:59

    Use const_iterator whenever you can, use iterator when you have no other choice.

    0 讨论(0)
提交回复
热议问题