丙烯酸聚氨酯油漆:怎样才能用带命行执行文件

来源:百度文库 编辑:杭州交通信息网 时间:2024/04/27 23:34:43
#include "stdio.h"
void main(int argc,char *argv[])
{ int i;
puts("\nThe output is as following");
for (i=1;i<argc;i++)
puts(argv[i]);
}
怎样用上面的程序执行test.txt文件;并输出
C:>test.exe Hi! Follow me
The output is as following
Hi!
Follow
me

编译,连接后生成test.exe,
将test.exe放在c盘下,
在 开始-〉运行中 输入cmd

再输入 C:>test.exe Hi! Follow me

即可