<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Infix to Postfix Expressions</title>
	<atom:link href="http://compscistuff.com/2008/09/infix-to-postfix-expressions/feed/" rel="self" type="application/rss+xml" />
	<link>http://compscistuff.com/2008/09/infix-to-postfix-expressions/</link>
	<description>Dedicated to satisfying your computer needs</description>
	<lastBuildDate>Mon, 17 Oct 2011 18:43:29 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: fen</title>
		<link>http://compscistuff.com/2008/09/infix-to-postfix-expressions/comment-page-1/#comment-711</link>
		<dc:creator>fen</dc:creator>
		<pubDate>Mon, 12 Sep 2011 09:02:37 +0000</pubDate>
		<guid isPermaLink="false">http://compscistuff.com/?p=21#comment-711</guid>
		<description>hello !:) what if i use letter rather than numbers in inputting the expression? your code is very useful :) thanks ..</description>
		<content:encoded><![CDATA[<p>hello !:) what if i use letter rather than numbers in inputting the expression? your code is very useful <img src='http://compscistuff.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  thanks ..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: chiffey</title>
		<link>http://compscistuff.com/2008/09/infix-to-postfix-expressions/comment-page-1/#comment-701</link>
		<dc:creator>chiffey</dc:creator>
		<pubDate>Tue, 12 Jul 2011 18:50:51 +0000</pubDate>
		<guid isPermaLink="false">http://compscistuff.com/?p=21#comment-701</guid>
		<description>#include 
#include 
#include 

class IntoPost{
	private:

      char post[100];
      char stackArr[100];
      int top;
      int num;

   public:

   	char infix[100];

      stack(){
      	num=0;
      	top= -1;
      }

      void push(char op){
      	stackArr[++top]=op;
      }

      char pop(){
      	return(stackArr[top--]);
      }

      bool isEmpty(){
      	return(top==-1);
      }

      void gotPost(char op){
      	post[num++]=op;
      }

      void gotOper(char op, int pre1){

      	while(!isEmpty()){
         	int pre2;
            char opTop=pop();

         	if(opTop==&#039;+&#039;&#124;&#124;opTop==&#039;-&#039;){
            	pre2=1;
            }
            else{
            	pre2=2;
            }

            if(pre2&lt;pre1){
            	push(opTop);
            }
            else{
            	gotPost(opTop);
            }
         }
         push(op);
      }

      void showPost(){
      	while(!isEmpty()){
         	post[num++]=pop();
         }

      	cout&lt;&lt;post;
      }
};
int main(){
	IntoPost Ip;

   cout&lt;&lt;&quot;Enter infix expression: &quot;;
	cin.getline(Ip.infix, 100);

   for(int i=0;i&lt;strlen(Ip.infix); i++){
   	char sign=Ip.infix[i];

      switch(sign){
      	case&#039;+&#039;:
         case&#039;-&#039;:
         	Ip.gotOper(sign, 1);
            break;
         case&#039;*&#039;:
         case&#039;/&#039;:
         	Ip.gotOper(sign, 2);
            break;
         default:
         	Ip.gotPost(sign);
            break;
         }
   }


   Ip.showPost();

   cin.get();
   cin.get();

   return 0;
}</description>
		<content:encoded><![CDATA[<p>#include<br />
#include<br />
#include </p>
<p>class IntoPost{<br />
	private:</p>
<p>      char post[100];<br />
      char stackArr[100];<br />
      int top;<br />
      int num;</p>
<p>   public:</p>
<p>   	char infix[100];</p>
<p>      stack(){<br />
      	num=0;<br />
      	top= -1;<br />
      }</p>
<p>      void push(char op){<br />
      	stackArr[++top]=op;<br />
      }</p>
<p>      char pop(){<br />
      	return(stackArr[top--]);<br />
      }</p>
<p>      bool isEmpty(){<br />
      	return(top==-1);<br />
      }</p>
<p>      void gotPost(char op){<br />
      	post[num++]=op;<br />
      }</p>
<p>      void gotOper(char op, int pre1){</p>
<p>      	while(!isEmpty()){<br />
         	int pre2;<br />
            char opTop=pop();</p>
<p>         	if(opTop==&#8217;+'||opTop==&#8217;-'){<br />
            	pre2=1;<br />
            }<br />
            else{<br />
            	pre2=2;<br />
            }</p>
<p>            if(pre2&lt;pre1){<br />
            	push(opTop);<br />
            }<br />
            else{<br />
            	gotPost(opTop);<br />
            }<br />
         }<br />
         push(op);<br />
      }</p>
<p>      void showPost(){<br />
      	while(!isEmpty()){<br />
         	post[num++]=pop();<br />
         }</p>
<p>      	cout&lt;&lt;post;<br />
      }<br />
};<br />
int main(){<br />
	IntoPost Ip;</p>
<p>   cout&lt;&lt;&quot;Enter infix expression: &quot;;<br />
	cin.getline(Ip.infix, 100);</p>
<p>   for(int i=0;i&lt;strlen(Ip.infix); i++){<br />
   	char sign=Ip.infix[i];</p>
<p>      switch(sign){<br />
      	case&#039;+&#039;:<br />
         case&#039;-&#039;:<br />
         	Ip.gotOper(sign, 1);<br />
            break;<br />
         case&#039;*&#039;:<br />
         case&#039;/&#039;:<br />
         	Ip.gotOper(sign, 2);<br />
            break;<br />
         default:<br />
         	Ip.gotPost(sign);<br />
            break;<br />
         }<br />
   }</p>
<p>   Ip.showPost();</p>
<p>   cin.get();<br />
   cin.get();</p>
<p>   return 0;<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kabayoman</title>
		<link>http://compscistuff.com/2008/09/infix-to-postfix-expressions/comment-page-1/#comment-669</link>
		<dc:creator>kabayoman</dc:creator>
		<pubDate>Wed, 24 Nov 2010 20:53:47 +0000</pubDate>
		<guid isPermaLink="false">http://compscistuff.com/?p=21#comment-669</guid>
		<description>@#www# 

I think if you are considering multiple digits in converting an infix to postfix expressions, better incorporate spaces between digits in your postfix.

Consider this infix expression as an example, 1+23; If you convert that into a postfix without spaces, it would take an unambiguous form of 123+ since it could also mean 12+3.

Now consider this, 12 3+. With the spaces, one can determine the right operand values.</description>
		<content:encoded><![CDATA[<p>@#www# </p>
<p>I think if you are considering multiple digits in converting an infix to postfix expressions, better incorporate spaces between digits in your postfix.</p>
<p>Consider this infix expression as an example, 1+23; If you convert that into a postfix without spaces, it would take an unambiguous form of 123+ since it could also mean 12+3.</p>
<p>Now consider this, 12 3+. With the spaces, one can determine the right operand values.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://compscistuff.com/2008/09/infix-to-postfix-expressions/comment-page-1/#comment-595</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Wed, 10 Mar 2010 23:30:44 +0000</pubDate>
		<guid isPermaLink="false">http://compscistuff.com/?p=21#comment-595</guid>
		<description>No thank you!</description>
		<content:encoded><![CDATA[<p>No thank you!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonas Stansbury</title>
		<link>http://compscistuff.com/2008/09/infix-to-postfix-expressions/comment-page-1/#comment-594</link>
		<dc:creator>Jonas Stansbury</dc:creator>
		<pubDate>Wed, 10 Mar 2010 11:30:36 +0000</pubDate>
		<guid isPermaLink="false">http://compscistuff.com/?p=21#comment-594</guid>
		<description>Since a noob I am always looking for on the net meant for these types of details .Thank you:P</description>
		<content:encoded><![CDATA[<p>Since a noob I am always looking for on the net meant for these types of details .Thank you:P</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: demas</title>
		<link>http://compscistuff.com/2008/09/infix-to-postfix-expressions/comment-page-1/#comment-588</link>
		<dc:creator>demas</dc:creator>
		<pubDate>Sun, 28 Feb 2010 06:02:56 +0000</pubDate>
		<guid isPermaLink="false">http://compscistuff.com/?p=21#comment-588</guid>
		<description>i think the program is to long and very complicated to understand...</description>
		<content:encoded><![CDATA[<p>i think the program is to long and very complicated to understand&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: #www#</title>
		<link>http://compscistuff.com/2008/09/infix-to-postfix-expressions/comment-page-1/#comment-345</link>
		<dc:creator>#www#</dc:creator>
		<pubDate>Sat, 24 Oct 2009 07:32:17 +0000</pubDate>
		<guid isPermaLink="false">http://compscistuff.com/?p=21#comment-345</guid>
		<description>thank u very much ...it&#039;s really nice code
and it help me much

but could you help more...by write a code to evaluate a postfix exp. and the code deals with multiple digit numbers 
e.g:
23 12 +
= 35

i will be thankfull if you help</description>
		<content:encoded><![CDATA[<p>thank u very much &#8230;it&#8217;s really nice code<br />
and it help me much</p>
<p>but could you help more&#8230;by write a code to evaluate a postfix exp. and the code deals with multiple digit numbers<br />
e.g:<br />
23 12 +<br />
= 35</p>
<p>i will be thankfull if you help</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Siturir</title>
		<link>http://compscistuff.com/2008/09/infix-to-postfix-expressions/comment-page-1/#comment-195</link>
		<dc:creator>Siturir</dc:creator>
		<pubDate>Mon, 10 Aug 2009 15:29:04 +0000</pubDate>
		<guid isPermaLink="false">http://compscistuff.com/?p=21#comment-195</guid>
		<description>I’m just dropping by to say that I very much liked seeing this post, it’s very clear and well written. Are you considering posting more about this? It appears like there is more fodder here for more posts.</description>
		<content:encoded><![CDATA[<p>I’m just dropping by to say that I very much liked seeing this post, it’s very clear and well written. Are you considering posting more about this? It appears like there is more fodder here for more posts.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Washington</title>
		<link>http://compscistuff.com/2008/09/infix-to-postfix-expressions/comment-page-1/#comment-154</link>
		<dc:creator>Michael Washington</dc:creator>
		<pubDate>Sat, 23 May 2009 19:07:49 +0000</pubDate>
		<guid isPermaLink="false">http://compscistuff.com/?p=21#comment-154</guid>
		<description>Hmmm I was thinking about writing more posts on this, but none of the readers sent me anything saying they would like for me to expand on it. So if you would like for me to expand on it even more let me know what topics and I will. This is a user-driven website.</description>
		<content:encoded><![CDATA[<p>Hmmm I was thinking about writing more posts on this, but none of the readers sent me anything saying they would like for me to expand on it. So if you would like for me to expand on it even more let me know what topics and I will. This is a user-driven website.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: w I Got a Free iPhone With Free iPhone Apps</title>
		<link>http://compscistuff.com/2008/09/infix-to-postfix-expressions/comment-page-1/#comment-152</link>
		<dc:creator>w I Got a Free iPhone With Free iPhone Apps</dc:creator>
		<pubDate>Sat, 23 May 2009 04:30:19 +0000</pubDate>
		<guid isPermaLink="false">http://compscistuff.com/?p=21#comment-152</guid>
		<description>I was just now searching around about this when I found your blog post.  I&#039;m only dropping by to say that I really liked seeing this post, it is really well written. Are you thinking of posting more on this? It appears like there is more material here for more posts.</description>
		<content:encoded><![CDATA[<p>I was just now searching around about this when I found your blog post.  I&#8217;m only dropping by to say that I really liked seeing this post, it is really well written. Are you thinking of posting more on this? It appears like there is more material here for more posts.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

