开发者

How to escape sprintf() % marks so they wont be recognized as variables?

So is this even possible? If i开发者_StackOverflow中文版 some day wanted to sprintf(str, "%doodle %d", var); output "%doodle 123" and not "123oodle", how can i stop the first %d from being processed?


%% escapes the %

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜