For Loop Attempt with GetGuessAndPrintBack error

Using VS 2019

I feel like doing this in the Main Function is probably a no go but not sure how to place it at the bottom with the rest yet.
Also getting a strange error for my GetGuessAndPrintBack(); string. It doesn’t stop the program from running though, any suggestions on how to remove the error message?
I’m an absolute noob at this, so any error messages causes heart palpitations lol.

Just note that not all warnings may be correct. I recently had warnings for a while in another IDE that the IDE devs finally removed because it was 100% incorrect and was really annoying that it took so long.

But… your for loop just calls one function which is a bit backward at the moment. Also, it looks like that returns a string but what is returned is not used at the moment. Both might be resolved as you work on the code.

You could either place the for loop in the function or add something else to it. You could also decide to not care because the end result is that it works as intended (hence warning) and even not assigning the return value to anything can be technically fine as long as its done with another call of the function somewhere else otherwise why have it. The IDE is there to let you know certain things that can be done.

You can’t necessarily (or won’t necessarily want to try to) resolve all of those things but you can try. I personally try to find middle ground and resolve them as I work on the code or when newly added ones to an IDE really annoy me but are understandable even if completely unnecessary.

1 Like

Thanks that resolves a lot of questions I’ve held in the back of my mind.
Now I can go forward with a better understanding regarding IDE and its warnings.
I really appreciate it. cheers.

1 Like

Privacy & Terms