0

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?

1
  • Is the code above a real copy/paste? Because of course it would not compile, it must be (int) instead of int(). Commented Feb 11, 2013 at 10:59

2 Answers 2

2

Change it to:

 inputs[(int)Phonemes.Phoneme0][(int)Features.PhonemeID] = 1;

your brackets were wrong :)

Sign up to request clarification or add additional context in comments.

Comments

0

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)

1 Comment

I fixed your typo too ;p And now you cancel it out!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.