postincrement And preincrement

来源:互联网 发布:a星算法原理路径规划 编辑:程序博客网 时间:2024/05/21 22:23
prefer ++pos over pos++
This is because it might have better
performance than the postincrement operator. The latter involves a temporary object because it
must return the old position of the iterator. For this reason, it generally is best to prefer ++pos
over pos++.
原创粉丝点击