#Infinite loop in matching code block problem
1 messages · Page 1 of 1 (latest)
Infinite loop in matching code block problem
Considering that you never recursively call your function: I doubt that you run into an infinite recursion error
That's only partially true.
Asking here if you haven't yet tried to figure out the issue isn't productive because you're not really learning anything.
If you did all the investigation work, i.e. create a minimal reproducible example (basically a version of your code that produces the bug, but from which you can't remove a single line of code or else the bug wouldn't occur anymore, either because the program doesn't compile anymore, because the program terminates early, or because the bug is never triggered).
Once you've done that you most likely have a rough idea of which lines of code are the problematic ones (namely the ones left in the minimal reproducible example).
You've either figured the bug out by now, but if not then you'll need to go into the debugger and try to understand what's going wrong exactly.
If by then you still can't figure out what the bug is, then is the best time to ask a question here. Send your minimal reproducible example, together with a (brief) explanation on what you want to do and how your code deviates from the desired behaviour. You then also share what your research revealed to likely be the problem/problematic area.
*You don't always have to start with creating a MRE. You can start with debugging, but if you get lost during debugging, creating a MRE is a good first step to simplify the problem.
Please don't delete your question -_-
Please keep in mind all helpers are volunteers, if you expect a solution within fifteen minutes you'll need to look for paid support somewhere.