How can i implement my Hangman Program using at least one class function in the program? Please teach me...
How can i implement my Hangman Program using at least one class function in the program? Please teach me...
If you want to add a class to the program, you could start by putting everything into the class. All the variables you are used in multiple places could be member variables. The functions could be member functions and use the member variables instead of having separate arguments. The code in main could be in a member function of the class and you could just create an instance of the class in the empty main() and call it's main function to run the simulation.
If you can get that working, you could try to find other things that do separate jobs that you could separate out into their own classes.