Using the less than comparison operator for strings

后端 未结 2 1674
执笔经年
执笔经年 2020-11-30 11:18

I\'m following a tutorial for C++ and looking at strings and overloading with operators such as +=, ==, != etc. Currently I have a sim

2条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-11-30 11:39

    The comparison operators implement lexicographic ordering of strings.

    -= and *= are not defined for strings.

提交回复
热议问题