Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions infix_to_postfix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ char stack::pop()
*/
if(top==-1)
{
cout<<"UNDERFLOW!!";
cout<<"UNDERFLOW!!!";
return -1;
}
else
Expand Down Expand Up @@ -110,7 +110,7 @@ char stack::peek()
*/

if(top!=-1)
return arr[top];
return arr[top];
else
{
cout<<"\nUNDERFLOW!";
Expand All @@ -131,7 +131,7 @@ bool stack::isEmpty()
if(top==-1)
return 1;
else
return 0;
return 0;
}

bool stack::isFull()
Expand Down Expand Up @@ -199,12 +199,13 @@ int main()
/*
objective:to implement stack operations
*/

int ch,n,ele,x;
string str;
bool ans;
char c;
stack s;
cout<<"\nENTER INFIX EXPRESSION";
cout<<"\nENTER INFIX EXPRESSION:";
cin>>str;
conversion(str,str.length());
getch();
Expand Down