So I wrote this little blackjack program pretty simple and it was working fine except for some reason the draw() function had to be declared in the dealerPlay function so I did that it worked then I added a pause cin.get(); to make it so the person can actually see the text and it glitched out only giving 0s when you hit and when you stayed it hit anyways so I just removed the pause but the problem persist can someone help me.
@Flaze07 if i do that it would cause other issues and i am aware using system is a bad practive but i am unaware of any other way to clear the screen other than system("cls");
both winders and unix have console drawing library that has things like moving the cursor to a location, clearing the screen, colored fonts, and other such things. I can't recall the libraries, but they are out there.
You can also clear the screen by writing X blank lines to it, though this leaves the cursor at the bottom instead of the top.
And system is just fine so long as you understand the issue. There are replacements for it you can use later, like shellexecute family, or spawn, etc. Your game isn't likely to become a major threat to your machine's security for calling cls :)
@Thomas my friends mom is a black jack dealer at a casino they draw until they're card is great than or equal to 17 then they no longer draw also if you draw at 17 you will more than likely bust anyways