<bdo id='ucvMp'></bdo><ul id='ucvMp'></ul>
    <legend id='ucvMp'><style id='ucvMp'><dir id='ucvMp'><q id='ucvMp'></q></dir></style></legend>
    1. <small id='ucvMp'></small><noframes id='ucvMp'>

      <tfoot id='ucvMp'></tfoot>

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

      std::stack 是否公开迭代器?

      时间:2024-05-11

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

                  <tbody id='m6f50'></tbody>

              • <small id='m6f50'></small><noframes id='m6f50'>

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

              • <tfoot id='m6f50'></tfoot>
                本文介绍了std::stack 是否公开迭代器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                C++ STL 中的 std::stack 是否暴露了底层容器的任何迭代器,还是我应该直接使用该容器?

                Does the std::stack in the C++ STL expose any iterators of the underlying container or should I use that container directly?

                推荐答案

                根据堆栈的定义,堆栈没有迭代器.如果您需要带有迭代器的堆栈,则需要在其他容器(std::list、std::vector 等)之上自己实现它.堆栈文档在这里.

                Stack does not have iterators, by definition of stack. If you need stack with iterators, you'll need to implement it yourself on top of other container (std::list, std::vector, etc). Stack doc is here.

                附言根据我从 Iraimblanja 得到的评论,默认情况下 std::stack 使用 std::deque 来实现.

                P.S. According to a comment i got from Iraimbilanja, std::stack by default uses std::deque for implementation.

                这篇关于std::stack 是否公开迭代器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:numeric_limits<double>::digits10是什么意思 下一篇:使用 std::ios_base::binary 有什么意义?

                相关文章

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

                  1. <tfoot id='UvFCU'></tfoot>

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

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

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