I am porting an obscure library form C to dart.
a property is defined on a struct like this
unsigned char payload[256];
I interpret that as an array of chars. So I converted it to
List<int> payload;
later in the original library there is this code
parser->handleDataValue( extendedCodeLevel, code, numBytes, parser->payload+i, parser->customData );
where 'i' is an index for a loop
I translated that to
parser.handleDataValue(extendedCodeLevel, code, numBytes, parser.payload + i, parser.customData);`
Now I am dealing with the error
The argument type 'int' can't be assigned to the parameter type 'List<int>'.
I understand the dart side of the problem but I don't understand what the original C means to write its dart equivalent.
&(parser->payload[i])pand indexi, the expressionp[i]is exactly equal to*(p + i). From this can be deduced thatp + iis a pointer to the element at indexi(i.e.&p[i]).payloadarray?ipoints to the element displacedielements from the starting point.