Reputation: 11389
I am confused what I should do to make this work:
enum Phonemes { Phoneme0 = 0, Phoneme1 = 1, Phoneme2 = 2 };
enum Features { PhonemeID = 0, IsFirst = 1, IsLast = 2 };
int[][] inputs = new int[3][];
inputs[0] = new int[3];
inputs[1] = new int[3];
inputs[2] = new int[3];
inputs[(int)Phonemes.Phoneme0][int()Features.PhonemeID] = 1;
The first enum to int works fine, but as soon as I add the [int()Features.PhonemeID], the compiler does not like it anymore.
Can somebody help?
Upvotes: 0
Views: 111
Reputation: 60694
I think this is a simple typo
Change it to this:
inputs[(int)Phonemes.Phoneme0][(int)Features.PhonemeID] = 1;
You have written int()
instead of (int)
Upvotes: 0
Reputation: 17590
Change it to:
inputs[(int)Phonemes.Phoneme0][(int)Features.PhonemeID] = 1;
your brackets were wrong :)
Upvotes: 2