• <tfoot id='cE3po'></tfoot>
  • <legend id='cE3po'><style id='cE3po'><dir id='cE3po'><q id='cE3po'></q></dir></style></legend>

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

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

      • <bdo id='cE3po'></bdo><ul id='cE3po'></ul>

        STL C++ 中的最后迭代器是什么?

        What is the past-the-end iterator in STL C++?(STL C++ 中的最后迭代器是什么?)

          <tfoot id='0rxsi'></tfoot>
          • <bdo id='0rxsi'></bdo><ul id='0rxsi'></ul>

                  <tbody id='0rxsi'></tbody>

                <legend id='0rxsi'><style id='0rxsi'><dir id='0rxsi'><q id='0rxsi'></q></dir></style></legend>

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

                  本文介绍了STL C++ 中的最后迭代器是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  谁能解释一下past-the-end 是什么意思.为什么我们调用 end() 函数越过结尾?

                  Any one could explain me what is the meaning of past-the-end. Why we call end() function past-the-end?

                  推荐答案

                  begin()end() 函数定义了一个半开range([begin, end)),意思是:
                  该范围包括第一个元素但不包括最后一个元素.因此,名称在末尾.

                  The functions begin() and end() define a half open range([begin, end)), which means:
                  The range includes first element but excludes the last element. Hence, the name past the end.

                  半开放范围的优势是:

                  1. 它避免了对空范围的特殊处理.对于空范围,begin() 等于end() .

                  它使迭代元素的循环的结束标准变得简单:循环简单只要没有到达 end() 就继续

                  It makes the end criterion simple for loops that iterate over the elements: The loops simply continue as long as end() is not reached

                  这篇关于STL C++ 中的最后迭代器是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  vector::at vs. vector::operator[](vector::at 与 vector::operator[])
                  C++ equivalent of StringBuffer/StringBuilder?(C++ 等效于 StringBuffer/StringBuilder?)
                  Adding types to the std namespace(将类型添加到 std 命名空间)
                  Is the C++ std::set thread-safe?(C++ std::set 线程安全吗?)
                  How to use std::find/std::find_if with a vector of custom class objects?(如何将 std::find/std::find_if 与自定义类对象的向量一起使用?)
                  I want to convert std::string into a const wchar_t *(我想将 std::string 转换为 const wchar_t *)
                  • <legend id='JQj0y'><style id='JQj0y'><dir id='JQj0y'><q id='JQj0y'></q></dir></style></legend>
                      <bdo id='JQj0y'></bdo><ul id='JQj0y'></ul>

                      1. <small id='JQj0y'></small><noframes id='JQj0y'>

                            <tfoot id='JQj0y'></tfoot>
                              <tbody id='JQj0y'></tbody>

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