Here's the problem, simplified...
I've got two boxes. I call them A and B. Both are objects of the class "Module" which has a number of sub-classes.
There's also a list menu. When something on the menu is pressed the selection of A or B is changed. Here's some
Pseudo Code:if(top is selected){
selected = A
switch to the bottom
}else{
selected = B
switch to the top
}
The trouble is this part.
Code:selected = A
I don't usually use pointers, but for this scenario I have to. Otherwise, I have to copy everything that can happen for A and B in to two lists with different left-sides because the next part right now looks like this
Code:
switch(menu_index){
case 0: selected = new SubOne(a,c,b,d,e,f,g);
case 1: selected = new SubTwo(h,i,j,k,l,m);
case 2: selected = new SubOne(n,o,p,q,r,s,t);
case 3: selected = new SubThree(u,v,w,x,y,z);
and so on... Can I please make a pointer? Help?? This sketch is already enormous. I can't afford to make two lists of all these menu commands.