I'm trying to make a blackjack program for my comp sci class and one thing I can do for extra credit is add a feature that allows a user to play a new game at the end of the first game (and replay games after each game).
My thought is to do the following:
* in the main() function, create a new instance of the blackjack class that will handle gameplay
* add a function that asks the user if they want to play a new game once the game is finished.
* if they want to play a new game I want to destroy the current blackjack instance and create a new one to proceed with the new game

How can I achieve the destruction/creation of an instance of the blackjack class within the class itself?
Is there a better way of doing this?

5 Years
Discussion Span
Last Post by tristanhall
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.