通过include 在编译器 读入txt文件
读入的txt文件内容 必须在每行左右两端包含 "
"Hello world"
"Goodbyle world"
""
是可以的 ,
char text [] = { #include "myfile.txt" }
int main()
{
const char* text =
#include "file.txt"
;
printf("%s", text);
return 0;
}
通过include 在编译器 读入txt文件
读入的txt文件内容 必须在每行左右两端包含 "
"Hello world"
"Goodbyle world"
""
是可以的 ,
char text [] = { #include "myfile.txt" }
int main()
{
const char* text =
#include "file.txt"
;
printf("%s", text);
return 0;
}