新学的C语言字符串赋值

#define  DIR  "D:\\test\\"

char filePath1[100]={DIR"hello.txt"};

char filePath2[100]={DIR};

char filePath3[100]={"D:\\""test\\""hello.txt"};

filePath1,filePath3,都是

"D:\test\hello.txt"

filePath2是

"D:\test\"

发布了11 篇原创文章 · 获赞 0 · 访问量 616

猜你喜欢

转载自blog.csdn.net/wuqi1003/article/details/104083063