ringa_lee
If your count is equal to xxx.size(), there is no big difference and it is not unsafe. But the question is why would you do this? Either just use xxx.at(i) to access without iterator; or just use iterator to access
Isn’t it better to use it != xxx.end() to control it directly? There is no need to define a new variable count to operate
How about a range for loop or iterator?
If your count is equal to xxx.size(), there is no big difference and it is not unsafe. But the question is why would you do this? Either just use xxx.at(i) to access without iterator; or just use iterator to access
Isn’t it better to use it != xxx.end() to control it directly? There is no need to define a new variable count to operate
How about a range for loop or iterator?