What is an iterator's default value?

前端 未结 4 709
你的背包
你的背包 2020-11-28 13:20

For any STL container that I\'m using, if I declare an iterator (of this particular container type) using the iterator\'s default constructor, what will the iterator be init

4条回答
  •  鱼传尺愫
    2020-11-28 13:56

    The iterator is not initialized, just as int x; declares an integer which isn't initialized. It does not have a properly defined value.

提交回复
热议问题