C 语言游戏源代码 67559C 语言游戏源代码1、 简单的开机密码程序#include"conio
h"#include"string
h"#include"stdio
h"voiderror(){window(12,10,68,10);textbackground(15);textcolor(132);clrscr();cprintf("fileorsystemerror
youcan'tenterthesystem
");while(1);/*若有错误不能通过程序*/}voidlook(){FILE*fauto,*fbak;char*pass="c:\\windows\\password
exe";/*本程序的位置*/chara[25],ch;char*au="autoexec
bat",*bname="hecfback
^^^";/*bname 是 autoexec
bat 的备份*/setdisk(2);/*setcurrentlydiskc:*/chdir("\\");/*setcurrentlydirectory\*/fauto=fopen(au,"r+");if(fauto==NULL){fauto=fopen(au,"w+");if(fauto==NULL)error();}fread(a,23,1,fauto);/*读取前 23 各字符*/a[23]='\0';if(strcmp(a,pass)==0)/*若读取的和 pass 指针一样就关闭文件,不然就添加*/fclose(fauto);else{fbak=fopen(bname,"w+");if(fbak==NULL)error();fwrite(pass,23,1,fbak);fputc('\n',fbak);rewind(fauto);whil