i want to get from an array
Code: Select all
static const char* listOne[] =
{
"CAR",
"BIKE" ,
"BOAT",
"JET" ,
"PLANE",
"SPACESHIP"
};
so we have
menu_id_prev_prev = 0
menu_id_prev =1
menu_id_next =3
menu_id_next_next=4
its kinda mind blowing , if its in the end of the array listOne[5] the next 2 is "bike" and next 1 is "CAR"
is there any way without many if and elses , to get from a specific element directly the previous and next values ?
even if i have to reconstruct -sort the array its kinda complicated..