c++程序中如何简单调用批处理文件

来源:互联网 发布:java简历ssh项目 编辑:程序博客网 时间:2024/06/05 18:44
函数名: system
  功 能: 发出一个DOS命令
  用 法: int system(char *command);
  system函数已经被收录在标准c库中,可以直接调用
  程序例:
  #include <stdlib.h>
  #include <stdio.h>
  int main(void)
  {
  printf("About to spawn command.com and run a DOS command\n");
  system("dir");
  return 0;
  }
原创粉丝点击