⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 diskfill.cpp

📁 一个非常简单但实用的磁盘填充程序
💻 CPP
字号:
// DiskFill.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include "string.h"
#include <stdlib.h>
#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<len) 
		{
			end = true;
			break;
		}
		printf(".");
	}
	fclose(fp);
	return 0;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -