可以在C中使用fflush在C ++中使用? [英] can fflush in C can be used in C++?

查看:126
本文介绍了可以在C中使用fflush在C ++中使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可以在C ++中使用C中的fflush吗?

我有一个程序需要在C ++中进行转换,但是代码在C中.

can fflush in C can be used in C++?

ihave a program that need to be converted in C++ but the code in C.

推荐答案

基本上,是的.在少数情况下,将C代码用作C ++可能会导致兼容性问题,因为相同的文本以不同的方式解释.您可以在代码中找出这些情况.请参阅:
http://en.wikipedia.org/wiki/Compatibility_of_C_and_C%2B%2B [ ^ ],
^ ].

—SA
Basically, yes. There are few cases where using C code as C++ could cause compatibility problems because the same text is interpreted in different ways. You can find out those case in your code. Please see:
http://en.wikipedia.org/wiki/Compatibility_of_C_and_C%2B%2B[^],
http://www.google.com/url?sa=t&rct=j&q=incompatibility+list+C+%22C%2B%2B%22&source=web&cd=1&ved=0CCgQFjAA&url=http%3A%2F%2Fdavid.tribble.com%2Ftext%2Fcdiffs.htm&ei=ZP1QT67jL4Hk0QHRwen_DQ&usg=AFQjCNEBUOIfd8HHoeEU1BYiSYzsl06XFQ[^].

—SA


这篇关于可以在C中使用fflush在C ++中使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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