system函数问题,调用系统命令不执行
高手看下这点程序有错吗?怎么运行后没反映#include <stdlib.h>
main()
{
system("shutdown -s");
}
2007-08-24 17:29
2007-08-24 17:37
2007-08-24 17:41
2007-08-24 17:46
2007-08-24 17:46
再顶。坚持!
2007-08-24 17:51
2007-08-24 18:28
2007-08-24 20:11
函数名: system
功 能: 发出一个DOS命令
用 法: int system(char *command);
程序例:
#include
#include
int main(void)
{
printf("About to spawn command.com and run a DOS command\n");
system("dir"); //这里就是DOS下的dir命令
return 0;
}

2007-08-24 20:14
#include<stdio.h>
#include<stdlib.h>

2007-08-24 20:16