I'm having some trouble converting the following code from c++ to c# because of pointers.
Basically I have a
STATE** State;
States = new STATE* [max_states];
for (int i=0; i < max_states; i++) {
States[i] = new STATE(max_symbols);
}
If this was some double array I would say
STATE[][] States;
States = new STATE[max_states][];
for (int i = 0; i '<' max_states; i++) {
States[i] = new STATE[max_symbols];
}
But the problem is the c++ code is not working "as" I expected it to.
States[i] = new STATE(max_symbols);
Has some strange behavior that for example allows
States[cur_state]->set_recur_out(k);
what exactly am I not seeing? This might be a beginner c++ question. Sorry if I don't make any sense at all =)