c++ - vector的迭代器能不能用for循环访问??
ringa_lee
ringa_lee 2017-04-17 14:30:24
0
3
938
ringa_lee
ringa_lee

ringa_lee

reply all(3)
洪涛

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?

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template