Can you explain HOW bool can control loops?
问题 I'm a beginner programmer in C++ (currently), and I've got a conceptual question. I'm trying to filter a cin input to ensure that it is a one-or-two-digit integer between 01-04, and if it isn't, to produce an error and ask for a new input. I'm also using map to give the user a list of options that, upon valid selection, routes inputs (integers) through any of several methods to produce a relevant result, but I'll ask a more specific version of this question elsewhere. I found a snippet of