C\C++定义多行文本的一种看着还行的方式

来源:【C/C++ 有没有更便捷的定义多行字符串方法?】https://www.zhihu.com/question/460748427/answer/1898930702

#include "stdint.h"
#include "stdlib.h"
#include "stdio.h"
#include "string.h"
const char s[]=R"EOF(
  A  |  B  |  \/\/ R
-----+-----+-----
  1  |  2  |  "2 \r \n
  4  |  5  |  "234"
)EOF";
int main()
{

    printf("%s",s);
   return 0;
}

 

 

输出:

posted @ 2022-01-21 23:38  爱哭的热带鱼  阅读(425)  评论(0编辑  收藏  举报