Originally Posted by
anduril462
Yes, that is what recursively means. There is also indirect recursion, were (for example), main calls some function foo(), which in turn calls main(). Notice main doesn't call itself directly, but it still calls itself in a roundabout way.
Basically, yes. Every time a function calls another function, it places some stuff on the stack. Think of a stack of papers, where each sheet of paper has all the data necessary for the current function: function parameters, local variables, temporary variables, etc. The top-most paper in that stack refers to the current function, the one below it the function that called the current function, on down to the first instance of main. Every time you call a function, you put a piece of paper on the stack with all the data for that function. When the function finishes, you take that paper off the stack. Now, when main calls itself recursively, when the user keeps choosing another team, you keep piling new papers on the stack, but you never finish a call to main, so they just keep piling up. Eventually your stack of papers will hit the ceiling and you're screwed. In computer terms, you run out of space for the stack and your program (probably) crashes, or at least doesn't work well. In practice, that takes many, many, many recursive calls to main, but it's still a potential problem. The loop version, however, doesn't use any extra stack space because it doesn't add anything to the stack, it all happens in the same instance of that function.
Any recursive solution has this potential problem, so usually you avoid things that can be "infinitely" recursive, like re-running the program. Recursive solutions lend well to finite things like certain data structures, algorithms or calculations. There may be a lot of data, and many layers of recursion, but you are usually sure it will terminate without too many recursive calls.
tl;dr: if somebody uses your program enough without stopping/restarting, you will run out of memory