echo的小问题,求解
时间:2011-08-12
来源:互联网
我想要在a.txt文本文件中加入一句话"以下是...,你懂得...",然后再将根目录下的文件名列表输入到该a.txt文本文件中,结果出错啦...求解阿...该如何使用echo呢???
#include<stdlib.h>
int main()
{
system("echo "以下是..,你懂得... ">a.txt");
system("ls / >>a.txt");
}
错误提示:
l.c: In function ‘main’:
l.c:4:2: error: stray ‘\344’ in program
l.c:4:2: error: stray ‘\273’ in program
l.c:4:2: error: stray ‘\245’ in program
l.c:4:2: error: stray ‘\344’ in program
l.c:4:2: error: stray ‘\270’ in program
l.c:4:2: error: stray ‘\213’ in program
l.c:4:2: error: stray ‘\346’ in program
l.c:4:2: error: stray ‘\230’ in program
l.c:4:2: error: stray ‘\257’ in program
l.c:4:26: error: expected identifier before ‘.’ token
l.c:4:26: error: stray ‘\344’ in program
l.c:4:26: error: stray ‘\275’ in program
l.c:4:26: error: stray ‘\240’ in program
l.c:4:26: error: stray ‘\346’ in program
l.c:4:26: error: stray ‘\207’ in program
l.c:4:26: error: stray ‘\202’ in program
l.c:4:26: error: stray ‘\345’ in program
l.c:4:26: error: stray ‘\276’ in program
l.c:4:26: error: stray ‘\227’ in program

#include<stdlib.h>
int main()
{
system("echo "以下是..,你懂得... ">a.txt");
system("ls / >>a.txt");
}
错误提示:
l.c: In function ‘main’:
l.c:4:2: error: stray ‘\344’ in program
l.c:4:2: error: stray ‘\273’ in program
l.c:4:2: error: stray ‘\245’ in program
l.c:4:2: error: stray ‘\344’ in program
l.c:4:2: error: stray ‘\270’ in program
l.c:4:2: error: stray ‘\213’ in program
l.c:4:2: error: stray ‘\346’ in program
l.c:4:2: error: stray ‘\230’ in program
l.c:4:2: error: stray ‘\257’ in program
l.c:4:26: error: expected identifier before ‘.’ token
l.c:4:26: error: stray ‘\344’ in program
l.c:4:26: error: stray ‘\275’ in program
l.c:4:26: error: stray ‘\240’ in program
l.c:4:26: error: stray ‘\346’ in program
l.c:4:26: error: stray ‘\207’ in program
l.c:4:26: error: stray ‘\202’ in program
l.c:4:26: error: stray ‘\345’ in program
l.c:4:26: error: stray ‘\276’ in program
l.c:4:26: error: stray ‘\227’ in program
作者: 四维帝国 发布时间: 2011-08-12
看到这种不清不白的提问,很是无语。。。
作者: yanyongkg 发布时间: 2011-08-12
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28