多阵列 [英] multiarray
问题描述
如何将数组声明为bool切片[x] [y] [z];
我想在类成员中声明这个。
谢谢。
How can I declare a array as bool slice[x][y][z];
I want declare this in a class member.
Thanks.
推荐答案
迅雷写道:
Thunder wrote:
如何将数组声明为bool slice [x] [y] [z];
我想在班级成员中声明这个。
谢谢。
How can I declare a array as bool slice[x][y][z];
I want declare this in a class member.
Thanks.
什么是x,y,z?详细说明您想要做什么。你有没有尝试过b $ b尝试过的东西?你有什么问题?这应该是一个动态数组吗?
Brian
What are x,y,z? Give some detail as to what you want to do. Have you
tried something? What problems did you have? Is this supposed to be a
dynamic array?
Brian
Thunder写道:
Thunder wrote:
如何将数组声明为bool slice [x] [y] [z];
我想在类成员中声明它。
How can I declare a array as bool slice[x][y][z];
I want declare this in a class member.
那么,只是将它声明为''bool slice [x] [y] [z]''的问题是什么?
< br $> b $ b -
祝你好运,
Andrey Tarasevich
So, what''s the problem with just declaring it as ''bool slice[x][y][z]''?
--
Best regards,
Andrey Tarasevich
默认用户ha scritto:
Default User ha scritto:
Thunder写道:
Thunder wrote:
如何将数组声明为bool slice [x] [y] [z];
我想在班级成员中声明这个。
谢谢。
How can I declare a array as bool slice[x][y][z];
I want declare this in a class member.
Thanks.
什么是x,y,z?详细说明您想要做什么。你有没有尝试过b $ b尝试过的东西?你有什么问题?这应该是一个
动态数组吗?
What are x,y,z? Give some detail as to what you want to do. Have you
tried something? What problems did you have? Is this supposed to be a
dynamic array?
x,y,z是函数成员的参数。是的,它是动态数组。
我想做这样的事情。
void func()
{
int sx = ....
int sy = ....
int sz = ....
slice = new [sx] [sy] [sz];
}
我的问题是以下我不知道因为我应该在会员类中声明数组
切片,
和我不知道为这个数组分配内存。
x,y,z are parameters of function member.Yes It''s a dynamic array.
I want to do something as this.
void func()
{
int sx=....
int sy=....
int sz=....
slice=new [sx] [sy] [sz];
}
My problem is the following I don''t know as I should declare array
slice in member class,
and I don''t know as allocate memory for this array.
这篇关于多阵列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!