A
Andreas
Hi,
can someone tell me how i do create a jump table in c or c++ ?
I tried this:
void f()
{
void *jump_table[] =
{
label1,
label2
};
goto jump_table[1];
label1:
// some code ...
label2:
// some code ...
}
It doesn't work,
the compiler (VC6) refuses to assign the labels to the array.
Please help me !
Andreas
can someone tell me how i do create a jump table in c or c++ ?
I tried this:
void f()
{
void *jump_table[] =
{
label1,
label2
};
goto jump_table[1];
label1:
// some code ...
label2:
// some code ...
}
It doesn't work,
the compiler (VC6) refuses to assign the labels to the array.
Please help me !
Andreas