Array declaration warning

Paul via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Jun 2 09:17:21 PDT 2015


This array of structures...

CoOrd pathList[NumPaths][];

generates a warning when compiled with DMD 32 bit -w flag, but 
not 64 bit.

If I correct the declaration to 'D style'

CoOrd[NumPaths][] pathList;

It compiles without warning but I cannot append items to the 
array like this...

pathList[n] ~= CoOrd(cX, cY);

What am I doing wrong?

TIA

Paul


More information about the Digitalmars-d-learn mailing list