c语言运行 qq

来源:百度知道 编辑:UC知道 时间:2024/05/27 07:14:08
比如 我的qq在 d:\\test文件夹下面
怎么 通过c语言 运行它 ,请给出完整代码
TC2.0下

函数名: system
功 能: 发出一个DOS命令
用 法: int system(char *command);
程序例:

#include <stdlib.h>
#include <stdio.h>

int main(void)
{
printf("About to spawn command.com and run a DOS command\n");
system("c:\\...\\***.exe"); <<=路径。记得要用两个\\才可以
return 0; 因为\是转义字符!
}
函数名: exec...
功 能: 装入并运行其它程序的函数
用 法: int execl(char *pathname, char *arg0, arg1, ..., argn, NULL);
int execle(char *pathname, char *arg0, arg1, ..., argn, NULL,
char *envp[]);
int execlp(char *pathname, char *arg0, arg1, .., NULL);
int execple(