ARRAY SIZE太大了 [英] ARRAY SIZE TOO LARGE

查看:79
本文介绍了ARRAY SIZE太大了的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用大于ARRAY [256] [256]的数组,但是

得到一个数组大小太大的错误。

我正在使用BC 3.1上的BC 3.1版本上的msdos ver 5.1.2600。

如何解决这个简单但烦人的问题。

解决方案

shreesh写道:


我想使用大于ARRAY [256] [256]的数组,但我是

得到一个数组大小太大的错误。

我在XP上使用msdos ver 5.1.2600上的BC 3.1。

如何解决这个简单但烦人的问题。



请不要喊。


什么以及在什么情况下?如果您达到自动变量的实施限制

,请尝试动态分配。


-

Ian Collins。


好。我的数组上下文如下。


struct authors

{

char name [50];

int uniq_id;

} node [10000];


i我的数组大小错误。

我尝试过使用如下巨大的贬值。


结构作者

{

char name [50];

int uniq_id;

};

struct authors huge node [10000];


然后我在访问时出现问题结构元素。

Ex:printf("%s",node [0] .name)

打印:( null)

所以仍然坚持尺寸限制。


我的方式是否正确访问各个结构元素?




Ian Collins写道:


shreesh写道:


我想使用一个大小的数组大于ARRAY [256] [256]但是获得数组大小的
o大错误。

我在XP上使用msdos ver 5.1.2600上的BC 3.1。

如何解决这个简单但烦人的问题。



请不要大喊。


什么以及在什么情况下?如果您达到自动变量的实施限制

,请尝试动态分配。


-

Ian Collins。




shreesh写道:


well。我的数组上下文如下。


struct authors

{

char name [50];

int uniq_id;

} node [10000];


i我的数组大小错误。

我尝试过使用如下巨大的贬值。


结构作者

{

char name [50];

int uniq_id;

};

struct authors huge node [10000];


然后我在访问时出现问题结构元素。

Ex:printf("%s",node [0] .name)

打印:( null)

所以仍然坚持尺寸限制。


我的方式是否正确访问各个结构元素?




Ian Collins写道:


shreesh写道:


我想使用一个大小的数组大于ARRAY [256] [256]但是获得了
数组大小太大错误。

我在XP上使用msdos ver 5.1.2600上的BC 3.1。

如何解决这个简单但烦人的问题。 />
>



请不要大喊。


什么以及在什么情况下?如果您达到自动变量的实施限制

,请尝试动态分配。


-

Ian Collins。


I want to use an array of size greater than ARRAY[256][256] but am
getting an array size too large error.
I am using a BC 3.1 on msdos ver 5.1.2600 on XP.
How can i get around this simple but irritating problem.

解决方案

shreesh wrote:

I want to use an array of size greater than ARRAY[256][256] but am
getting an array size too large error.
I am using a BC 3.1 on msdos ver 5.1.2600 on XP.
How can i get around this simple but irritating problem.

Please don''t shout.

Array of what and in what context? If you hit an implementation limit
for automatic variables, try dynamic allocation.

--
Ian Collins.


well. my array context is as follows.

struct authors
{
char name[50];
int uniq_id;
}node[10000];

i am getting an array out of size error.
I tried using the huge decleration as follows.

struct authors
{
char name[50];
int uniq_id;
};
struct authors huge node[10000];

But then i a m having problems in accesing the structure elements.
Ex: printf("%s",node[0].name)
prints: ( null )
So am still stuck with the size limitation.

Is my way of accessing the individual structure elements correct??



Ian Collins wrote:

shreesh wrote:

I want to use an array of size greater than ARRAY[256][256] but am
getting an array size too large error.
I am using a BC 3.1 on msdos ver 5.1.2600 on XP.
How can i get around this simple but irritating problem.

Please don''t shout.

Array of what and in what context? If you hit an implementation limit
for automatic variables, try dynamic allocation.

--
Ian Collins.



shreesh wrote:

well. my array context is as follows.

struct authors
{
char name[50];
int uniq_id;
}node[10000];

i am getting an array out of size error.
I tried using the huge decleration as follows.

struct authors
{
char name[50];
int uniq_id;
};
struct authors huge node[10000];

But then i a m having problems in accesing the structure elements.
Ex: printf("%s",node[0].name)
prints: ( null )
So am still stuck with the size limitation.

Is my way of accessing the individual structure elements correct??



Ian Collins wrote:

shreesh wrote:

I want to use an array of size greater than ARRAY[256][256] but am
getting an array size too large error.
I am using a BC 3.1 on msdos ver 5.1.2600 on XP.
How can i get around this simple but irritating problem.
>

Please don''t shout.

Array of what and in what context? If you hit an implementation limit
for automatic variables, try dynamic allocation.

--
Ian Collins.


这篇关于ARRAY SIZE太大了的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆