Vector clear vs. resize

前端 未结 4 1937
谎友^
谎友^ 2020-12-15 07:59

I read on the Internet that if you are clearing a std::vector repetitively (in a tight loop), it might be better to use resize(0) instead of

4条回答
提交回复
热议问题