<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

      Multidimensional std::array(多维 std::array)

      <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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                相关文档推荐

                What is the past-the-end iterator in STL C++?(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 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>
                      <tbody id='odvIa'></tbody>

                    <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>
                    • <tfoot id='odvIa'></tfoot>