Tried to create another function to hold the loop. It worked out - but perhaps this is too much?

I tried to do it by creating another function to hold the loop process, and just calling that function in main. I thought this would be good, along the lines of the abstraction topic that came before - but perhaps it was overkill?

I really want to get to where I can type out code like that as easily as I speak English…
Are you able to do that without constantly referring to various lectures? I’m kinda struggling with cin and getting answers and repeating them back… I’m trying to get more proficient in that right now…

The only reason it’s too much is because now you have a useless string “GetGuessAndPrintBack” you don’t have to create a void or string to make the for expression to work. It works you’ve just added more than needed.

Privacy & Terms