i have follwoing code in c++ .i want to continue it till suer give input as 'Y' or 'y'
but its not working fine ..and do not ask for expression in the code ( cout << "Enter postfix expression to evaluate:" << endl << endlCode:// my first program in C++ #include <iostream> #include <stdlib.h> #include <conio.h> #include <stdio.h> //#inlcude <iostream> #include <stdlib.h> #include <conio.h> #include <ctime> using namespace std; void Evaluatexp(char ch[]); //void Evaluatexp(string ch); int main () { char postfixexp[100]; // string postfixexp; char ch='Y'; //cout << "Hello World!" << endl << endl; while(ch=='Y' || ch=='y') { cout << "Enter postfix expression to evaluate:" << endl << endl; gets(postfixexp); //cin >> postfixexp; cout << (postfixexp); Evaluatexp(postfixexp); cout << "Do you want to enter another postfix expression to evaluate? [Y/N]" << endl << endl; // getch(ch); cin >> ch; cout << ch; } system("PAUSE"); return 0; }
any help??