I know it sounds weird but when i uncomment statements in the following ,it works perfectly fine for infix to postfix conversion.although comments are simple cout statements,,execution with cout statements as comments breaks in b/w.
I have found this particularly with a^b-c.
DevCPP is also showing similar behavior.
I can't understand what's going on.I am working on code blocks. Please help!!
using namespace std;
void push(char c)
int prec(char a)
The program is doing "infix to postfix" conversion.
I am really not able to find either syntactical or logical error in the code you have asked to do so.
#define NULL 0
is not helping. And moreover i have been using NULL since long as a keyword.
It is really a confusion how the code works correct by some cout statements as you see uncommenting the comments in the above code makes it work well,specifically for a^b-c as input.