- 已关闭。**此问题需要debugging details。当前不接受答案。
编辑问题以包含desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem。这将有助于其他人回答问题。
2天前关闭。
Improve this question
warning: unknown escape sequence: '\!' [enabled by default]
printf("\\ this is a back-slash character\!\n");
^
w1p2.c:25:9: warning: unknown escape sequence: '\!' [enabled by default]
printf("%% this is a percent sign character\!\n");
^
w1p2.c:26:9: warning: unknown escape sequence: '\!' [enabled by default]
printf("\" this is a double - quote character\!\n");
我做了一个简单的printf
程序,我不断收到这些消息。
到底是怎么回事,我该怎么解决?
在此之前,我尝试使用\
符号,但效果不佳。
1条答案
按热度按时间yh2wf1be1#
到底是怎么回事,我该怎么解决?
只有部分字符可以转义(C11 § 6.4.4.4、§ 6.4.5、§ 6.4.3)。
!
不是其中之一,并且打印!
不需要\
。简单转义序列:其中之一
八进制转义序列:
十六进制换码序列:
通用字符名称: