[英]How to declare 2d arrays in array class
x[50][40] and y[50][40] are the 2d arrays. x [50] [40]和y [50] [40]是二维数组。 I am using array class.
我正在使用数组类。 How to declare these in array class?
如何在数组类中声明这些?
array <array<long double>> x(50,array<long double>(40)),y(50,array<long double>(40));
I have used the above code in my program like the way a vector is declared as in enter link description here But getting errors. 我在程序中使用了上面的代码,就像在这里的输入链接描述中声明矢量的方式一样,但是会出错。 Please help.
请帮忙。
#include <array>
...
typedef ::std::array< ::std::array< double, 40 >, 50 > t_My2dArray_50_40;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.