In my program, I have a struct similar to the following:
public struct switchStruct{char nextSwitch [7];
int randomNumber;
};
What I am trying to do is create a struct instance named currentSwitch for use in a while loop. I would like the currentSwitch.nextSwitch to be able to point to the randomNumber field in the next switch. The pseudocode would like the following:
(currentSwitch.nextSwitch).randomNumber
In other words, say the current switch is switchB, with a nextSwitch value of 'switchC'. I want the code to be able to take 'switchC' and be able to retrieve the value of switchC.randomNumber.
Is this possible? I am using Visual C++ with CLR. This part of the code would be in a form header file.
Thanks!