Why is it better to use '!=" than '<' in a vector loop? (C++)

后端 未结 7 1316
没有蜡笔的小新
没有蜡笔的小新 2021-01-02 04:53

Why is it better to use \'!=\" than \'<\' in a vector loop? I just can\'t see the difference.

相关标签:
7条回答
  • 2021-01-02 05:49

    Some iterator types don't support the less-than operator -- they only support the inequality operator. That's why you'll often see the less-than operator forsaken.

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