Hello! I have recently started programming C++ for college classes ( im in data structures now.. its getting pretty difficult) So I am trying to make little projects in my spare time to try to improve on what I have done.
Here I have made a 'slot' machine program that first calculates how much money you have then how much you wanna bet. You can win partially (2 of the 3 horizontally) win (3 horitonally) and diagonally.
I am looking to improve this code or look for ideas to add to it. I thought about trying to visual perspective with QT but I don't think im ready for that. Any thoughts and suggestions would help for this new kid on the block :)
- check out strstream class for better formatting when printing your machine slots (cout stuff..)
- check out fstream to open a .txt file and save your money-amount (and load it next time you start the game instead of typing in an amount)
- maybe you could gather all those "int num1 - num8" in one array and then make a loop to create those random numbers (rand() % 9 + 1 stuff)
Thanks for the reply :) I will definitely look into those. I really like the money amount save. I thought about separating out the game to its own class but im not sure if thats really needed