My programs test to see if the user input is a well formed formula. My try again loop in my code does the loop but it skips the user input and goes straight to saying it is a invalid WFF. I need some help as to why it is doing that.Thanks for any help.
else if (isalpha(c)). isalpha takes an int not char else if (isalpha(int(c)))
A char can always be safely cast into an int, int is just a bigger char integer, you don't need the explicit int conversation. Internally, the character is converted into the integer value corresponding to its ASCII value when passed.
nightsky, please edit your post and format your code! Edit your post, highlight your code, and press the "<>" button under "Format:". Thank you.
Sorry yea i forgot to format it. so after the first input and the output given back to the user, then it prompts the user to choose if they want to stop the program Y/N and the Y input works but the N does not it lets the user input but it does not give the correct output.