I don't know if my title is very descriptive, but I will try explain my problem. Please keep in mind that I am a beginner!
I built a class to randomly select 5 objects (fruit in this case) from a pool of 5 different types of objects. The class has 2 procedures. The first randomly selects the 5 objects (I have no problem with this). The second shows (prints out) which 5 were selected (I am struggling).
I can think of a couple ways to do this, but for the sake of nice looking code I want to use an array.
I'm trying to store which object was chose to a 2 dimensional (ie selected_fruit). I would then use a for loop to simply print out each character. I initialize in private like this
then I include it in the constructor
and in function like this
for(int x = 0; x < 6; x++)
random_spin = (rand()%100+1);
I have tried tons of variations of this and nothing is working. I tried sting array instead of char array. I also tried using pointers (which I don't really understand well) like I found in this example.