C语言实现获取内存信息并输出的实例
实现实例代码:
headfile.h
#include#include #include #define TRUE 1 #define FALSE 0 #define MAX 10000 typedef int KeyType; typedef int OtherType; typedef struct { KeyType key; OtherType other_data; }RecordType;
seek.cpp
#include "stdafx.h"
#include "headfile.h"
#include "windows.h"
#include "conio.h "
#include"Winbase.h"
#include "Psapi.h"
#pragma once
#pragma message("Psapi.h --> linking with Psapi.lib")
#pragma comment(lib,"Psapi.lib")
int Data[MAX]={0};
void produceData(int a[],int length) //给数组生成数据,用于随即查找
{
time_t t;
srand(time(&t));
for (int i=0;i
感谢阅读,希望能帮助到大家,谢谢大家对本站的支持!



