{"id":356,"date":"2006-06-03T09:06:17","date_gmt":"2006-06-03T01:06:17","guid":{"rendered":"http:\/\/fdream.net\/blog\/article\/356.aspx"},"modified":"2006-06-03T18:06:51","modified_gmt":"2006-06-03T10:06:51","slug":"%e6%8a%8a%e4%b8%ad%e7%bc%80%e8%a1%a8%e8%be%be%e5%bc%8f%e8%bd%ac%e5%8c%96%e4%b8%ba%e5%90%8e%e7%bc%80%e8%a1%a8%e8%be%be%e5%bc%8f","status":"publish","type":"post","link":"https:\/\/fdream.net\/blog\/article\/356","title":{"rendered":"\u628a\u4e2d\u7f00\u8868\u8fbe\u5f0f\u8f6c\u5316\u4e3a\u540e\u7f00\u8868\u8fbe\u5f0f"},"content":{"rendered":"<p><b>\u7b97\u6cd5\u7684\u7528\u9014\uff1a<\/b><\/p>\n<p>\u6211\u7684\u76ee\u7684\u5f88\u7b80\u5355\uff0c\u505a\u4e00\u4e2a24\u70b9\u724c\u7684Flash\u5c0f\u6e38\u620f\uff0c\u63a5\u53d7\u7528\u6237\u8f93\u5165\u7684\u8868\u8fbe\u5f0f\uff0c\u7136\u540e\u8ba1\u7b97\u7ed3\u679c\u3002\u8c8c\u4f3c\u5728AS\u4e2d\u6ca1\u6709\u53ef\u4ee5\u76f4\u63a5\u8ba1\u7b97\u5b57\u7b26\u4e32\u8868\u8fbe\u5f0f\u7684\u51fd\u6570\uff0c\u6240\u4ee5\u53ea\u597d\u81ea\u5df1\u5199\u4e86\u3002\u8981\u8ba1\u7b97\u8fd9\u4e2a\u8868\u8fbe\u5f0f\uff08\u5e26\u62ec\u53f7\uff09\u9996\u5148\u5f97\u628a\u62ec\u53f7\u53bb\u6389\uff0c\u62ec\u53f7\u771f\u7684\u662f\u633a\u9ebb\u70e6\u7684\u4e00\u4e2a\u4e1c\u4e1c\uff0c\u6240\u4ee5\u8fd8\u5f97\u9009\u540e\u7f00\u8868\u8fbe\u5f0f-_-<\/p>\n<p><b>\u7b97\u6cd5\u57fa\u672c\u601d\u60f3\uff1a<\/b><\/p>\n<p>\u4f7f\u7528\u4e09\u4e2a\u6570\u7ec4\uff0c\u4e00\u4e2a\u6570\u7ec4\u4fdd\u5b58\u7528\u6237\u8f93\u5165\u7684\u8868\u8fbe\u5f0f\uff08\u4e2d\u7f00\u8868\u8fbe\u5f0f\uff09\uff0c\u4e00\u4e2a\u6570\u7ec4\u4fdd\u5b58\u540e\u7f00\u8868\u8fbe\u5f0f\uff0c\u4e00\u4e2a\u6570\u7ec4\u4f5c\u4e3a\u8fd0\u7b97\u7b26\u7684\u6808\u3002<\/p>\n<p>\u4ece\u5934\u5230\u5c3e\u626b\u63cf\u4e2d\u7f00\u8868\u8fbe\u5f0f\uff0c\u5bf9\u4e0d\u540c\u7c7b\u578b\u7684\u5b57\u7b26\u6309\u4e0d\u540c\u60c5\u51b5\u5904\u7406\uff1b<br \/>1\u3001\u5982\u679c\u662f\u6570\u5b57\u5219\u76f4\u63a5\u653e\u5165\u540e\u7f00\u8868\u8fbe\u5f0f\u6570\u7ec4\uff1b<br \/>2\u3001\u5982\u679c\u662f\u5de6\u62ec\u53f7\u5219\u76f4\u63a5\u5165\u6808\uff1b<br \/>3\u3001\u5982\u679c\u662f\u53f3\u62ec\u53f7\uff0c\u5219\u628a\u4ece\u6808\u9876\u76f4\u5230\u5bf9\u5e94\u5de6\u62ec\u53f7\u4e4b\u95f4\u7684\u8fd0\u7b97\u7b26\u4f9d\u6b21\u9000\u6808\uff0c\u5e76\u6e05\u9664\u5bf9\u5e94\u7684\u5de6\u62ec\u53f7\uff1b<br \/>4\u3001\u5bf9\u4e8e\u8fd0\u7b97\u7b26\uff0c\u5982\u679c\u8be5\u8fd0\u7b97\u7b26\u7684\u4f18\u5148\u7ea7\u5927\u4e8e\u6808\u9876\u4f18\u5148\u7ea7\uff0c\u5219\u76f4\u63a5\u5165\u6808\uff0c\u82e5\u8be5\u8fd0\u7b97\u7b26\u7684\u4f18\u5148\u7ea7\u5c0f\u4e8e\u7b49\u4e8e\u6808\u9876\u4f18\u5148\u7ea7\uff0c\u5219\u5148\u628a\u6808\u9876\u8fd0\u7b97\u7b26\u51fa\u6808\uff0c\u5199\u5165\u540e\u7f00\u8868\u8fbe\u5f0f\u6570\u7ec4\uff0c\u7136\u540e\u518d\u5165\u6808\uff1b<br \/>5\u3001\u626b\u63cf\u5b8c\u6210\u540e\uff0c\u53d6\u51fa\u6808\u4e2d\u6240\u6709\u8fd0\u7b97\u7b26\uff0c\u5199\u5165\u540e\u7f00\u8868\u8fbe\u5f0f\u6570\u7ec4\u3002<\/p>\n<p><b>\u793a\u4f8b\u7a0b\u5e8f\u5982\u4e0b<\/b>\uff08\u9762\u5411\u8fc7\u7a0b\u7684C(++)\u7248\uff0c\u5728VC6\u4e0b\u7f16\u8bd1\u901a\u8fc7\uff09\uff1a<\/p>\n<blockquote>\n<p>\/****************************\/<br \/>\/*\t\tfdream.net\t\t*\/<br \/>\/*\t\t Author:Fdream\t\t*\/<br \/>\/*\t\u5f15\u7528\u6b64\u7b97\u6cd5\u8bf7\u4fdd\u7559\u6b64\u4fe1\u606f\t*\/<br \/>\/****************************\/<\/p>\n<p>#include<iostream.h><\/p>\n<p>const int MAX=40;<\/p>\n<p>void main(void){<br \/>\tchar infix[MAX]={&#8216;#&#8217;};<br \/>\tchar oprator[MAX]={&#8216;@&#8217;,&#8217;#&#8217;};<br \/>\tint opr=1;<br \/>\tchar postfix[12]={&#8216;#&#8217;};<br \/>\tint post=0;<br \/>\tint i,j,cnt=0,cntl;<br \/>\tchar c;<\/p>\n<p>\t\/\/\u8f93\u5165\u8868\u8fbe\u5f0f\uff0c\u4ee5\u7b49\u53f7\u7ed3\u675f<br \/>\tcin.get(c);<br \/>\twhile(c!=&#8217;=&#8217;){<br \/>\t\tinfix[cnt]=c;<br \/>\t\tcnt++;<br \/>\t\tcin.get(c);<br \/>\t}<br \/>\tcntl=cnt;<\/p>\n<p>\tfor(i=0;i<cnt;i++){<br \/>\t\tswitch(infix[i]){<br \/>\t\t\/\/\u5de6\u62ec\u53f7\u5c31\u76f4\u63a5\u5165\u6808<br \/>\t\tcase &#8216;(&#8216;:<br \/>\t\t\tcntl=cntl-2;<br \/>\t\t\toprator[opr]=infix[i];<br \/>\t\t\topr++;<br \/>\t\t\tbreak;<br \/>\t\t\/\/\u53f3\u62ec\u53f7\u5219\u5148\u9000\u6808\uff0c\u76f4\u5230\u9047\u89c1\u7b2c\u4e00\u4e2a\u5de6\u62ec\u53f7<br \/>\t\tcase &#8216;)&#8217;:<br \/>\t\t\tfor(j=opr-1;j>0;j&#8211;){<br \/>\t\t\t\tif(oprator[j]!='(&#8216;){<br \/>\t\t\t\t\tpostfix[post]=oprator[j];<br \/>\t\t\t\t\toprator[j]=&#8217;#&#8217;;<br \/>\t\t\t\t\tpost++;<br \/>\t\t\t\t}<br \/>\t\t\t\telse{<br \/>\t\t\t\t\toprator[j] = &#8216;#&#8217;;<br \/>\t\t\t\t\tbreak;<br \/>\t\t\t\t}<br \/>\t\t\t}<br \/>\t\t\topr=j;<br \/>\t\t\tbreak;<br \/>\t\tcase &#8216;*&#8217;:<br \/>\t\tcase &#8216;\/&#8217;:<br \/>\t\t\t\/\/\u5982\u679c\u524d\u4e00\u4e2a\u8fd0\u7b97\u7b26\u4e3a*\u6216\/\uff0c\u5219\u5148\u9000\u6808,\u518d\u5165\u6808,\u5426\u5219\u76f4\u63a5\u5165\u6808<br \/>\t\t\tif (oprator[opr] == &#8216;*&#8217; || oprator[opr] == &#8216;\/&#8217;) {<br \/>\t\t\t\tpostfix[post] = oprator[opr];<br \/>\t\t\t\toprator[opr]=&#8217;#&#8217;;<br \/>\t\t\t\tpost++;<br \/>\t\t\t}<br \/>\t\t\toprator[opr] = infix[i];<br \/>\t\t\topr++;<br \/>\t\t\tbreak;<br \/>\t\tcase &#8216;+&#8217; :<br \/>\t\tcase &#8216;-&#8216; :<br \/>\t\t\t\/\/\u5982\u679c\u4e0a\u4e00\u4e2a\u8fd0\u7b97\u7b26\u4e0d\u662f\u5de6\u62ec\u53f7\u4e5f\u4e0d\u662f\u6808\u9876\uff0c\u5219\u5148\u9000\u6808\u518d\u5165\u6808<br \/>\t\t\tif (oprator[opr-1] != &#8216;(&#8216; &#038;&#038; oprator[opr-1] != &#8216;@&#8217;) {\t\t\t<br \/>\t\t\t\tpostfix[post] = oprator[opr];<br \/>\t\t\t\toprator[opr]=&#8217;#&#8217;;<br \/>\t\t\t}<br \/>\t\t\toprator[opr] = infix[i];<br \/>\t\t\topr++;<br \/>\t\t\tbreak;<br \/>\t\tdefault :<br \/>\t\t\t\/\/\u5982\u679c\u662f\u6570\u5b57\u5219\u76f4\u63a5\u8fdb\u5165\u540e\u7f00\u8868\u8fbe\u5f0f\u6570\u7ec4<br \/>\t\t\tpostfix[post] = infix[i];<br \/>\t\t\tpost++;<br \/>\t\t\tbreak;<br \/>\t\t}<br \/>\t}<\/p>\n<p>\t\/\/\u5982\u679c\u626b\u63cf\u5b8c\u6210\uff0c\u5219\u9000\u6808<br \/>\tfor(j=opr-1;j>0;j&#8211;){<br \/>\t\tif(oprator[j]!=&#8217;@&#8217;){<br \/>\t\t\tpostfix[post]=oprator[j];<br \/>\t\t\toprator[j]=&#8217;#&#8217;;<br \/>\t\t}<br \/>\t\telse<br \/>\t\t\tbreak;<br \/>\t}<\/p>\n<p>\t\/\/\u8f93\u51fa\u7ed3\u679c<br \/>\tfor(i=0;i<cntl;i++)<br \/>\t\tcout << postfix[i];<br \/>\tcout << endl;<br \/>}<\/p>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>\u7b97\u6cd5\u7684\u7528\u9014\uff1a \u6211\u7684\u76ee\u7684\u5f88\u7b80\u5355\uff0c\u505a\u4e00\u4e2a24\u70b9\u724c\u7684Flash\u5c0f\u6e38\u620f\uff0c\u63a5\u53d7\u7528\u6237\u8f93\u5165\u7684\u8868\u8fbe\u5f0f\uff0c\u7136\u540e\u8ba1\u7b97\u7ed3\u679c\u3002\u8c8c\u4f3c\u5728AS\u4e2d\u6ca1\u6709\u53ef\u4ee5\u76f4\u63a5\u8ba1\u7b97\u5b57\u7b26\u4e32\u8868\u8fbe\u5f0f\u7684\u51fd\u6570\uff0c\u6240\u4ee5\u53ea\u597d\u81ea\u5df1\u5199\u4e86\u3002\u8981\u8ba1\u7b97\u8fd9\u4e2a\u8868\u8fbe\u5f0f\uff08\u5e26\u62ec\u53f7\uff09\u9996\u5148\u5f97\u628a\u62ec\u53f7\u53bb\u6389\uff0c\u62ec\u53f7\u771f\u7684\u662f\u633a\u9ebb\u70e6\u7684\u4e00\u4e2a\u4e1c\u4e1c\uff0c\u6240\u4ee5\u8fd8\u5f97\u9009\u540e\u7f00\u8868\u8fbe\u5f0f-_- \u7b97\u6cd5\u57fa\u672c\u601d\u60f3\uff1a \u4f7f\u7528\u4e09\u4e2a\u6570\u7ec4\uff0c\u4e00\u4e2a\u6570\u7ec4\u4fdd\u5b58\u7528\u6237\u8f93\u5165\u7684\u8868\u8fbe\u5f0f\uff08\u4e2d\u7f00\u8868\u8fbe\u5f0f\uff09\uff0c\u4e00\u4e2a\u6570\u7ec4\u4fdd\u5b58\u540e\u7f00\u8868\u8fbe\u5f0f\uff0c\u4e00\u4e2a\u6570\u7ec4\u4f5c\u4e3a\u8fd0\u7b97\u7b26\u7684\u6808\u3002 \u4ece\u5934\u5230\u5c3e\u626b\u63cf\u4e2d\u7f00\u8868\u8fbe\u5f0f\uff0c\u5bf9\u4e0d\u540c\u7c7b\u578b\u7684\u5b57\u7b26\u6309\u4e0d\u540c\u60c5\u51b5\u5904\u7406\uff1b1\u3001\u5982\u679c\u662f\u6570\u5b57\u5219\u76f4\u63a5\u653e\u5165\u540e\u7f00\u8868\u8fbe\u5f0f\u6570\u7ec4\uff1b2\u3001\u5982\u679c\u662f\u5de6\u62ec\u53f7\u5219\u76f4\u63a5\u5165\u6808\uff1b3\u3001\u5982\u679c\u662f\u53f3\u62ec\u53f7\uff0c\u5219\u628a\u4ece\u6808\u9876\u76f4\u5230\u5bf9\u5e94\u5de6\u62ec\u53f7\u4e4b\u95f4\u7684\u8fd0\u7b97\u7b26\u4f9d\u6b21\u9000\u6808\uff0c\u5e76\u6e05\u9664\u5bf9\u5e94\u7684\u5de6\u62ec\u53f7\uff1b4\u3001\u5bf9\u4e8e\u8fd0\u7b97\u7b26\uff0c\u5982\u679c\u8be5\u8fd0\u7b97\u7b26\u7684\u4f18\u5148\u7ea7\u5927\u4e8e\u6808\u9876\u4f18\u5148\u7ea7\uff0c\u5219\u76f4\u63a5\u5165\u6808\uff0c\u82e5\u8be5\u8fd0\u7b97\u7b26\u7684\u4f18\u5148\u7ea7\u5c0f\u4e8e\u7b49\u4e8e\u6808\u9876\u4f18\u5148\u7ea7\uff0c\u5219\u5148\u628a\u6808\u9876\u8fd0\u7b97\u7b26\u51fa\u6808\uff0c\u5199\u5165\u540e\u7f00\u8868\u8fbe\u5f0f\u6570\u7ec4\uff0c\u7136\u540e\u518d\u5165\u6808\uff1b5\u3001\u626b\u63cf\u5b8c\u6210\u540e\uff0c\u53d6\u51fa\u6808\u4e2d\u6240\u6709\u8fd0\u7b97\u7b26\uff0c\u5199\u5165\u540e\u7f00\u8868\u8fbe\u5f0f\u6570\u7ec4\u3002 \u793a\u4f8b\u7a0b\u5e8f\u5982\u4e0b\uff08\u9762\u5411\u8fc7\u7a0b\u7684C(++)\u7248\uff0c\u5728VC6\u4e0b\u7f16\u8bd1\u901a\u8fc7\uff09\uff1a \/****************************\/\/* fdream.net *\/\/* Author:Fdream *\/\/* \u5f15\u7528\u6b64\u7b97\u6cd5\u8bf7\u4fdd\u7559\u6b64\u4fe1\u606f *\/\/****************************\/ #include const int MAX=40; void main(void){ char infix[MAX]={&#8216;#&#8217;}; char oprator[MAX]={&#8216;@&#8217;,&#8217;#&#8217;}; int opr=1; char postfix[12]={&#8216;#&#8217;}; int post=0; int i,j,cnt=0,cntl; char c; \/\/\u8f93\u5165\u8868\u8fbe\u5f0f\uff0c\u4ee5\u7b49\u53f7\u7ed3\u675f cin.get(c); while(c!=&#8217;=&#8217;){ infix[cnt]=c; cnt++; cin.get(c); } cntl=cnt; for(i=0;i0;j&#8211;){ if(oprator[j]!='(&#8216;){ postfix[post]=oprator[j]; oprator[j]=&#8217;#&#8217;; post++; } else{ oprator[j] = &#8216;#&#8217;; break; } } opr=j; &hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[212,211],"class_list":["post-356","post","type-post","status-publish","format-standard","hentry","category-coding","tag-212","tag-211"],"views":36332,"_links":{"self":[{"href":"https:\/\/fdream.net\/blog\/wp-json\/wp\/v2\/posts\/356","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fdream.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fdream.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fdream.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fdream.net\/blog\/wp-json\/wp\/v2\/comments?post=356"}],"version-history":[{"count":0,"href":"https:\/\/fdream.net\/blog\/wp-json\/wp\/v2\/posts\/356\/revisions"}],"wp:attachment":[{"href":"https:\/\/fdream.net\/blog\/wp-json\/wp\/v2\/media?parent=356"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fdream.net\/blog\/wp-json\/wp\/v2\/categories?post=356"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fdream.net\/blog\/wp-json\/wp\/v2\/tags?post=356"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}