Andrej Mitrovic:

struct kie { short a; short b; }
short[kie] possibles;
...
Try:

short[][kie];

In D structs/classes usually start with an upper case letter:

struct Kie { short a, b; }

But if you want to use Kie as key in an associative array you have to add it the full hashing protocol of three functions: equality, hash function and comparison.

A simpler solution is to use a Tuple, that already defines those three methods:

alias Kie = Tuple!(short,"a", short,"b");

Bye,
bearophile

Reply via email to