Hello! I'm having trouble accessing a void that has variables inside of it. I would like to keep it similar to the other Voids (playOneHand()), but any advice would be very helpful!
Could you re-phrase the question please and point out where you have a problem. Preferably without using the term 'void; I think you intend it as a synonym for 'function' which it is not.
The problem is that I don't know how to access the 'initializeDeck(int deck[])' from the 'playOneHand()' function. If I make int deck[] function separate from the initializeDeck, I would need to declare the size of the array, which I don't want to do.
Basically, what I'm saying is, is there a way to enter initializeDeck(int deck[]) after entering the playOneHand() function? (Which I can access since it doesn't have any variables inside of it).
Maybe make the deck a member of class blackjack, then you don't have to pass the deck as a parameter to initializeDeck() and you can call it right from playOneHand()
Because then I would have to call the size of the array, which I preferably wouldn't want to do. I mean, I'll look into it, but is there really a solution to this?