作为宏ic C ++实现的putc? [英] putc implemented as Macro ic C++?

查看:69
本文介绍了作为宏ic C ++实现的putc?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道 putc()在C语言中的宏实现,但是在C ++中也一样?

I know Macro implementation of putc() in C, but is it same in C++?

推荐答案

这取决于您对 cstdio 的实现.在大多数情况下,这实际上只是围绕 stdio.h 的包装,其中在 std 命名空间内声明了包装,并且在 C C ++ 编译器为 C 函数共享相同的标准库.例如,VS2010将 stdio.h 用于 C ++ ,其中 putc 被实现为宏功能,具体取决于环境和其他编译时定义.

It will depend on your implementation of cstdio. In most cases this is really just a wrapper around stdio.h, with wrappers declared inside the std namespace, and the C and C++ compilers share the same standard library for C functions. For example, VS2010 uses stdio.h for C++, in which putc is implemented as both a macro and a function, depending on environment and other compile-time definitions.

这篇关于作为宏ic C ++实现的putc?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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