I need some help. I am in a C++ class and we need to build a blackjack game. The professor provided some code for us to fill in the blanks. I just can't get my head around a piece of it. I'll try to post the whole thing, but may not be space.
Basically what the lines are doing is they are assigning a number 1 - 4 to Isuit (Which will represent the suit of the card like 1 = hearts, 2 = Diamonds, ect). It also assigns a random number 1 - 13 to iCard which will resprent the number on the card 13 meaning Ace I assume 12 meaning King, ect.
Thanks for the comments, but maybe I should have clarified. I understand what the logic is, but I don't know what problem with the syntax is. In the sample (lines 94 to 99) how is the random number value assigned to the array elements? It isn't running inside of a loop so that I could use the index value as the value for the array element.