c++ - c语言有原始字符串的表达方式,或者替代方案么?
PHP中文网
PHP中文网 2017-04-17 14:37:02
0
2
487

类似于python中有语法可标识原始字符串 而非转移字符

print r'\n'
直接打印 \n

为了解决此问题:c语言中使用正则表达式,没有原始字符表达 很不方便.

或者有没有什么其他替代的方案,谢谢

PHP中文网
PHP中文网

认证高级PHP讲师

reply all(2)
伊谢尔伦

Write a preprocessor yourself.

伊谢尔伦

It feels like it has nothing to do with regular expressions.

c can completely meet your needs, just escape it.

#include <stdio.h>
int main() {
    printf("\n");
    return 0;
}
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template