acceptable fix for majority of signed/unsigned warnings?

后端 未结 7 765
清酒与你
清酒与你 2021-01-12 03:32

I myself am convinced that in a project I\'m working on signed integers are the best choice in the majority of cases, even though the value contained within can never be neg

7条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-12 03:47

    Definitely use an iterator. Soon you will be able to use the 'auto' type, for better readability (one of your concerns) like this:

    for (auto i = someVector.begin();
         i != someVector.end();
         ++i)
    

提交回复
热议问题