/*
* File: main.cpp
* Author: xuehaiyisu
*
* Created on 2011年9月6日, 13:23
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <conio.h>
int main(int argc, char** argv)
{
char *filename;
filename=new char[50];
printf("请输入文件名:");
gets(filename);
char *cpy;
cpy=new char[100];
strcpy(cpy,"copy ");
strcat(cpy,filename);
strcat(cpy," ");
char *disk;
disk=new char[10];
printf("请输入要复制到的盘符:");
gets(disk);
strcat(cpy,disk);
printf("\n");
puts(cpy);
system(cpy);
delete [] disk;
delete [] cpy;
delete [] filename;
system("pause");
return 0;
}
|