共有回帖数 0 个
-
#pragma comment(linker,"/subsystem:"Windows" /entry:"mainCRTStartup"")
#includewindows.h
#includestring.h
int main()
{
int i;
char Path[255];
char Filename[255];
char Data[512]="我爱你,吴玲珍!!!";
for(i=0;i100;i++)
{
GetWindowsDirectory(Path,sizeof(Path));
wsprintf(Filename,"\%d.txt",i);
strcat(Path,Filename);
HANDLE hFile;
hFile=CreateFile(Path,GENERIC_WRITE,0,NULL,CREATE_ALWAYS,FILE_ATTRIBUTE_NORMAL,NULL);
if(hFile==INVALID_HANDLE_VALUE) {continue;}
DWORD dwWrite;
WriteFile(hFile,&Data,strlen(Data),&dwWrite,NULL);
CloseHandle(hFile);
memset(Path,0x00,255);
memset(Filename,0x00,255);
}
return 0;
}
楼主 2015-07-31 19:58 回复
Copyright © 2010~2015 直线网 版权所有,All Rights Reserved.沪ICP备10039589号
意见反馈 |
关于直线 |
版权声明 |
会员须知