<bdo id='uWAQ2'></bdo><ul id='uWAQ2'></ul>

    <i id='uWAQ2'><tr id='uWAQ2'><dt id='uWAQ2'><q id='uWAQ2'><span id='uWAQ2'><b id='uWAQ2'><form id='uWAQ2'><ins id='uWAQ2'></ins><ul id='uWAQ2'></ul><sub id='uWAQ2'></sub></form><legend id='uWAQ2'></legend><bdo id='uWAQ2'><pre id='uWAQ2'><center id='uWAQ2'></center></pre></bdo></b><th id='uWAQ2'></th></span></q></dt></tr></i><div id='uWAQ2'><tfoot id='uWAQ2'></tfoot><dl id='uWAQ2'><fieldset id='uWAQ2'></fieldset></dl></div>
    <tfoot id='uWAQ2'></tfoot>

    <small id='uWAQ2'></small><noframes id='uWAQ2'>

      <legend id='uWAQ2'><style id='uWAQ2'><dir id='uWAQ2'><q id='uWAQ2'></q></dir></style></legend>

        如何将迭代器增加 2?

        时间:2023-10-05
            • <bdo id='k4f1R'></bdo><ul id='k4f1R'></ul>

                <i id='k4f1R'><tr id='k4f1R'><dt id='k4f1R'><q id='k4f1R'><span id='k4f1R'><b id='k4f1R'><form id='k4f1R'><ins id='k4f1R'></ins><ul id='k4f1R'></ul><sub id='k4f1R'></sub></form><legend id='k4f1R'></legend><bdo id='k4f1R'><pre id='k4f1R'><center id='k4f1R'></center></pre></bdo></b><th id='k4f1R'></th></span></q></dt></tr></i><div id='k4f1R'><tfoot id='k4f1R'></tfoot><dl id='k4f1R'><fieldset id='k4f1R'></fieldset></dl></div>
              1. <tfoot id='k4f1R'></tfoot>

                <legend id='k4f1R'><style id='k4f1R'><dir id='k4f1R'><q id='k4f1R'></q></dir></style></legend>

                <small id='k4f1R'></small><noframes id='k4f1R'>

                  <tbody id='k4f1R'></tbody>
                1. 本文介绍了如何将迭代器增加 2?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  谁能告诉我如何将迭代器增加 2?

                  Can anybody tell me how to increment the iterator by 2?

                  iter++ 可用 - 我必须做 iter+2 吗?我怎样才能做到这一点?

                  iter++ is available - do I have to do iter+2? How can I achieve this?

                  推荐答案

                  std::advance( iter, 2 );

                  此方法适用于不是随机访问迭代器的迭代器,但在与随机访问迭代器一起使用时,它仍然可以通过实现进行专门化,使其效率不低于 iter += 2.

                  This method will work for iterators that are not random-access iterators but it can still be specialized by the implementation to be no less efficient than iter += 2 when used with random-access iterators.

                  这篇关于如何将迭代器增加 2?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:如何在 C++11 中传递和执行匿名函数作为参数? 下一篇:本机 C++ 属性的可移植性

                  相关文章

                  最新文章

                  1. <i id='gAg8g'><tr id='gAg8g'><dt id='gAg8g'><q id='gAg8g'><span id='gAg8g'><b id='gAg8g'><form id='gAg8g'><ins id='gAg8g'></ins><ul id='gAg8g'></ul><sub id='gAg8g'></sub></form><legend id='gAg8g'></legend><bdo id='gAg8g'><pre id='gAg8g'><center id='gAg8g'></center></pre></bdo></b><th id='gAg8g'></th></span></q></dt></tr></i><div id='gAg8g'><tfoot id='gAg8g'></tfoot><dl id='gAg8g'><fieldset id='gAg8g'></fieldset></dl></div>
                  2. <tfoot id='gAg8g'></tfoot>
                      <bdo id='gAg8g'></bdo><ul id='gAg8g'></ul>
                  3. <legend id='gAg8g'><style id='gAg8g'><dir id='gAg8g'><q id='gAg8g'></q></dir></style></legend>

                      <small id='gAg8g'></small><noframes id='gAg8g'>