By looking at your original code and your explanation how you judge whether it is polar form, it is clear that your code is a dead loop.
Your constructComplex() calls itself unless it is not in polar form. The way you check whether it is in polar form is to see whether there is a _ in the middle of the string (not the first char). You does that PolarToRect() convertion, however the return tells us that the rect form also has a _ in it. Now your rect form seems to the computer as a polar form because of that _ in the middle... So your program just goes on and on, as it never sees an input that is not polar form based on its judgement.
In reply to Re: Constructing complex numbers using recursion
by pg
in thread Constructing complex numbers using recursion
by moltar512
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |