它是不好的做法,使用C ++ C的特征? [英] Is it bad practice to use C features in C++?

查看:80
本文介绍了它是不好的做法,使用C ++ C的特征?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

例如的printf 而不是 COUT scanf函数而不是的CIN ,使用的#define 宏等?

For example printf instead of cout, scanf instead of cin, using #define macros, etc?

推荐答案

我不会说不好,因为这将取决于个人的选择。我的策略时,有一个类型安全的替代方案是在C ++中可用,使用他们,因为它会降低code中的错误。

I wouldn't say bad as it will depend on the personal choice. My policy is when there is a type-safe alternatives is available in C++, use them as it will reduce the errors in the code.

这篇关于它是不好的做法,使用C ++ C的特征?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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