您的位置:首页 > 编程语言 > C语言/C++

C++调用系统命令

2009-08-12 06:01 253 查看
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
main()
{
char file1[15];
char file2[16]=" ";//一个空格
char copycmd[50]="copy ";
char plotcmd[80]="wgnuplot.exe C:\\mytest\\diagram.txt";
//    printf("input first name\n");
//    scanf("%s",file1);
//    printf("input first name\n");
//    scanf("%s",file2+1);
//    strcat(copycmd,file1);
//    strcat(copycmd,file2);
//    printf("%s\n",copycmd);
//char cmds[20]="diagram.txt"
//strcat(plotcmd,)
printf("%s\n",plotcmd);
system(plotcmd);
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: