• boost multi array


    Boost MultiArray is a library that simplifies using arrays with multiple dimensions.

    1.

    #include <boost/multi_array.hpp>
    #include <iostream>
    
    int main() {
      boost::multi_array<char, 1> a(boost::extends[6]);
      a[0] = 'B';
      a[1] = 'o';
      a[2] = 'o';
      a[3] = 's';
      a[4] = 't';
      a[5] = '';
      std::cout << a.origin() << std::endl;
      return 0;
    }

    boost::multi_array is a template expecting two parameters: The first parameter is the type of the elements to store in the array. The second parameter determines how many dimensions the array should have. The second parameter only sets the number of dimensions, not the number of elements in each dimension.

  • 相关阅读:
    Top WAF
    Access-Control-Allow-Origin与跨域
    SQLlite
    SHell命令总结
    yum仅下载RPM包不安装
    Taglib
    JFinal
    Eclipse maven git
    maven jetty plugin
    wechat
  • 原文地址:https://www.cnblogs.com/sssblog/p/11050551.html
Copyright © 2020-2023  润新知