+ -
当前位置:首页 → 问答吧 → echo的小问题,求解

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

作者: 四维帝国   发布时间: 2011-08-12

看到这种不清不白的提问,很是无语。。。

作者: yanyongkg   发布时间: 2011-08-12