我需要關於數組結構initiliazation的幫助。在下面的代碼中,我們如何完成評論中定義的initiliazation?在c中使用數組的結構#
class structExample
{
struct state{
int previousState;
int currentState;
}
static state[] durum;
public static void main(String[] args)
{
durum = new state[5];
// how we can assign new value to durum[0].previousState = 0; doesn't work ??
}
}
}
謝謝..
[可變的結構是邪惡的](http://stackoverflow.com/questions/441309/why-are-mutable-structs-vil) – digEmAll 2011-04-01 21:39:37