如何获得双引号成字符串? [英] How to get double quotes into a string literal?
本文介绍了如何获得双引号成字符串?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何把话说努力在双引号在的printf()
语句(所以输出包含试图
)而不干扰的printf()
报价?
的printf(我在这两座兰博与ACE绷带是我想要换我的膝盖上。);
解决方案
逃生与反斜杠引号:
的printf(等等等等\\试图\\等等等等);
How to put the words 'trying to' in double quotes in a printf()
statement (so the output contains "trying to"
) without interfering with the printf()
quotes?
printf("i'm in that two seat lambo with an ace bandage. i'm trying to wrap my knee.");
解决方案
Escape the quotes with backslashes:
printf("blah blah \"trying to\" blah blah");
这篇关于如何获得双引号成字符串?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文