printf 函数如何在输出时采用可变参数? [英] How can printf function can take variable parameters in number while output them?
本文介绍了printf 函数如何在输出时采用可变参数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我真的很想知道 printf 是如何执行的.C中是否有参数数组结构?我可以像 printf 一样定义我的自定义函数吗?
I really wonder how printf executed. Is there a parameter array structure in C? Can i define my custom function like printf?
推荐答案
一种特殊类型 va_list
用于使用变量列表论证.阅读这个.
A special type va_list
is used for using variable list arguements. read this.
这篇关于printf 函数如何在输出时采用可变参数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文