error: array subscript is not an integer

Manal Helal manalorama@gmail.com
Wed Jun 25 04:52:00 GMT 2008


Hi

Is there any other types bigger then 'long long"?

thanks,

Manal

> 2008/6/24 Manal Helal <manalorama@gmail.com>:
>>
>> Hi
>>
>> Thank you for your reply, sorry I realized that what I am looking for
>> is "long long", don't know how I used out of memory "double long",
>> once fixed the integer issue disappeared,
>>
>>
>> Thanks,
>>
>> Manal
>>
>>
>> 2008/6/23 Tim Prince <TimothyPrince@sbcglobal.net>:
>> > Manal Helal wrote:
>> >>
>> >> Hi
>> >>
>> >> I am trying to construct a multidimensional array (as linear array in
>> >> memory, but indexed with equations to represent the dimensions) of
>> >> size 30 each, and 6 dimensions, which is 30^6=729000000
>> >>
>> >> using a long type for the array crashes, as it is outside the range
>> >> values. I used double long data type, and I had the above error: array
>> >> subscript is not an integer
>> >>
>> >> Is there a work around this problem that I can implement,  or another
>> >> way of creating similar arrays?
>> >>
>> >
>> > If you want total target independence, maybe there is no way.  If your data
>> > type is wide enough that this array exceeds 2GB, on the most common 64-bit
>> > OS, you should be able to create a dynamic array of this size.  A size_t
>> > data type would make more sense than making us guess what you mean by double
>> > long.  Technically, double long might be the same as long double, a floating
>> > point type unsuitable for an array subscript.
>> >
>> >
>>
>>
>>
>> --
>> Kind Regards,
>>
>> Manal Helal
>
>
>
> --
> Kind Regards,
>
> Manal Helal


--
Kind Regards,

Manal Helal



More information about the Gcc-help mailing list