www.pudn.com > DiskFill.rar > DiskFill.cpp


// DiskFill.cpp : Defines the entry point for the console application. 
// 
 
#include "stdafx.h" 
#include "string.h" 
#include  
#include "windows.h" 
int main(int argc, char* argv[]) 
{ 
	char *p; 
	long len=1024*1024*50; 
	char szPath[256]; 
	GetCurrentDirectory(256,szPath); 
	strcat(szPath,"\\diskfile"); 
	p=new char[len]; 
	memset(p,0,len); 
	FILE* fp; 
	int i=0; 
	int ll; 
	bool end=false; 
	printf("\nwrite to %s\n",szPath); 
	fp=fopen(szPath,"w"); 
	while(!end) 
	{ 
		ll = fwrite(p,1,len,fp); 
		if(ll