开发者

What is %n in printf and how to use it? [duplicate]

This question already has answers here: What is the use of the 开发者_StackOverflow中文版%n format specifier in C? (12 answers) Closed 9 years ago.

What is %n in printf?

How to use it in my codes (with a sample code please)?

Thanks.

Edit:

After googling I couldn't found any sample about %n. But some people close this question without an answer.


The %n specifier does not print anything and the corresponding argument must be a pointer to signed integer where the number of characters written so far is stored.

Source C++ Reference

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜