由于程序执行的时候产生了许多临时文件,
想通过程序实现删除这些文件,怎么实现啊?
用了
system(del, temp001.txt temo002.txt);
好像不对?

解决方案 »

  1.   

    搂主:
           您的提问有问题!
           您问如何执行dos命令吧,如del 、dir、cd 等!
            system函数是Turbo C等工具带的,vc中用法不一样,具体参见MSDN.        替代函数:
                      使用ShellExecute,WinExec,CreateProcess等函数,如
                  WinExec(“command.exe /c del temp*.txt ”,SW_HIDE);Good Luck!
         
      

  2.   

    ShellExecute
    WinExec,
    CteateProcess