本文介绍了使用结构的长号Claculator的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题解决了,谢谢。我不知道如何删除这篇文章...



我尝试过:



感谢您的帮助,我不知道如何删除这篇文章。

Problem solved, thank you. I don´t know how to delete this post so...

What I have tried:

Thank you for helping, I do not know how to delete this post.

推荐答案

// wrong
while (scanf("%s %s", &op, &buf) == 2)
// should be just:
while (scanf("%s %s", op, buf) == 2)



您还需要刷新输入下一个 scanf ,因为仍然会有一个要读取的换行符。


You also need to flush the input for the next scanf, as there will still be a newline character to be read.


这篇关于使用结构的长号Claculator的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-24 19:27