我在TC编译时通过,但是在Windows2000注册表,没有发现有更改。
用DEV-C++ 编译说
(1)D:\Program Files\WINYES\TC201E\Project\111.cpp In function `int main()':
(2)10 D:\Program Files\WINYES\TC201E\Project\111.cpp `spawnl' undeclared (first use this function)
(3)(Each undeclared identifier is reported only once for each function it appears in.) 3个错误。
请老师指教我一下,小弟自学,身在国外,所以你们就是我的老师了,只有请教您了。
代码如下
#include "stdio.h"
main()
{
FILE *output;
char *regadd={"REGEDIT4\n\n[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run]\n\"cleaner\"=\"C:\\cleaner.bat /s\""};
if((output=fopen("$$$$$","w"))!=NULL)
{
fprintf(output,regadd);
fclose(output);
spawnl(1,"c:\\windows\\regedit.exe"," /s $$$$$",NULL);
}
}
[此贴子已经被作者于2007-8-24 22:47:11编辑过]