I only got 2 months of coding experience. just decided to build this simple project. this is something simple i decided to put together, is there anything i could improve on?
Awesome use of the switch statement but you forgot to put a break on line 32.
Also you can use the <random> Header for random number generation. You can still seed it with time(0) though so that’s not too bad. Here’s a. Tutorial I made on it recently it’s really easy and fast: https://repl.it/talk/learn/Random-Number-Generation-in-C/24953
@sanjaykdragon 🤦♂️ I think you need to read my comment again because you’re assuming a lot of stupid where there isn’t, I’m honestly kind of insulted. I know what sizeof does, what it does has certain side affects that are sometimes exploited to the detriment of those of us still learning. Also it’s a C style array. Not a fancy aggregate type. There is not special function member in the array. It’s just. an array. next time read more carefully because nowhere in my post do I even try to explain what it does, because it doesn’t matter because I’m telling them not to use it.