On 6/30/23 08:18, lili wrote:

How too wirte this: addPoint({4,5}, {4,6})

In this case, arrays are better but only if you don't define a constructor, which you don't need for simple types like Point below:

struct Point {
    int x;
    int y;
}

void main() {
    // The type is explicit on the left-hand side
    Point[] points = [ {1,2} ];
}

Ali

Reply via email to