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
精彩评论