The following code is correct:
public Sample mOboeSamples[] = { new Sample(1,1), new Sample(1,2) };
public Sample mGuitarSamples[] = { new Sample(1,1), new Sample(1,2) };
public SampleSet mSampleSet[] = {
new SampleSet( "oboe", mOboeSamples ),
new SampleSet( "guitar", mGuitarSamples)
};
but I'd like to write something like:
public SampleSet mSampleSet[] = {
new SampleSet( "oboe", { new Sample(1,1), new Sample(1,2) } ),
new SampleSet( "guitar", { new Sample(1,1), new Sample(1,2) } )
};
This does not compile.
Is there some bit of syntax I'm missing, or is this a language 'feature'?