C中的Postfix的前缀 [英] Infix to Postfix in C

查看:91
本文介绍了C中的Postfix的前缀的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每当我对后缀程序运行infix时,都会在该infix表达式的末尾附加一个奇数字符,该字符会打印到屏幕上.我看了十几遍,不知道为什么要这么做.我正在使用GCC编译器在ubuntu linux中进行编译.如果有人知道哪里出了问题,请帮忙!我的代码可以在这里找到:

http://codepad.org/ZNAt0YUX

Whenever I run my infix to postfix program I get a odd character appended to the end of the infix expression, which I print to the screen. I''ve looked over it a dozen times and have no idea why it is doing it. I''m compiling in ubuntu linux using a GCC compiler. If anyone knows what is wrong please help! my code can be found here:

http://codepad.org/ZNAt0YUX

推荐答案

要处理的代码太多读.尝试调试以查找故障所在,然后返回一些数据和问题.
Too much code to read. Try debugging to find where the fault lies and then come back wit some more data and questions.


您的pop方法可能有问题
Could be a problem with your pop method


这篇关于C中的Postfix的前缀的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆