欧卡2中文社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

需要三步,才能开始

只需两步,慢速开始

玩欧卡就用莱仕达V10方向盘欧卡2入门方向盘选莱仕达V9莱仕达折叠便携游戏方向盘支架欢迎地图Mod入驻
查看: 2428|回复: 0
收起左侧

文件复制

[复制链接]
script 发表于 2011-11-10 20:44 | 显示全部楼层 |阅读模式
/* 
 * 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;
}

联系我们|手机版|欧卡2中国 ( 湘ICP备11020288号-1 )

GMT+8, 2024-4-19 20:02 , Processed in 0.040794 second(s), 8 queries , Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表