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

    <legend id='UMNIc'><style id='UMNIc'><dir id='UMNIc'><q id='UMNIc'></q></dir></style></legend>
  1. <small id='UMNIc'></small><noframes id='UMNIc'>

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

      多维 std::array

      时间:2024-05-12

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

            • <bdo id='RgExj'></bdo><ul id='RgExj'></ul>
                <tbody id='RgExj'></tbody>
              1. <legend id='RgExj'><style id='RgExj'><dir id='RgExj'><q id='RgExj'></q></dir></style></legend>

              2. <small id='RgExj'></small><noframes id='RgExj'>

              3. 本文介绍了多维 std::array的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                在 C++ 中,如何创建多维 std::array?我试过这个:

                In C++, how do I create a multidimensional std::array? I've tried this:

                std::array<std::array<int, 3>, 3> arr = {{5, 8, 2}, {8, 3, 1}, {5, 3, 9}};
                

                但它不起作用.我做错了什么,我该如何解决?

                But it doesn't work. What am I doing wrong and how do I fix this?

                推荐答案

                你需要额外的括号,直到 c++14 提案 生效.

                You need extra brackets, until c++14 proposal kicks in.

                std::array<std::array<int, 3>, 3> arr = {{{5, 8, 2}, {8, 3, 1}, {5, 3, 9}}};
                

                这篇关于多维 std::array的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:boost 是否具有比 STL 更简单的集合操作数据类型? 下一篇:如何从 C++ 容器中获取随机元素?

                相关文章

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

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

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

                    <legend id='odvIa'><style id='odvIa'><dir id='odvIa'><q id='odvIa'></q></dir></style></legend>
                  1. <tfoot id='odvIa'></tfoot>