Array declaration warning
Mike Parker via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Tue Jun 2 18:43:08 PDT 2015
On 6/3/2015 1:37 AM, Paul wrote:
> On Tuesday, 2 June 2015 at 16:23:32 UTC, Adam D. Ruppe wrote:
>> On Tuesday, 2 June 2015 at 16:17:23 UTC, Paul wrote:
>>> CoOrd[NumPaths][] pathList;
>>
>> Try CoOrd[][NumPaths].
>>
>> The order is opposite in D style than in C style (I thnk the D style
>> makes more sense, it just reads one direction, but it does index
>> differently than you're used to in C)
>
> Thank you - I can see this will cause me no end of problems until I get
> my head 'round it!
>
int[] -> A dynamic array of int
int*[] -> A dynamic array of int*
int[][] -> A a dynamic array of int[]
int[3] -> a static array of int
int*[3] -> a static array of int*
int[][3] -> a static array of int[]
More information about the Digitalmars-d-learn
mailing list