-
大小: 4.27KB文件類型: .rar金幣: 1下載: 0 次發(fā)布日期: 2021-01-29
- 標(biāo)簽: 學(xué)習(xí)??
資源簡介
自己寫的內(nèi)存分配
代碼片段和文件信息
//#include?
#include?“MemoryAllo.h“
int?main(int?argc?char?*argv[])
{
????P_MEMORY_MANAGE?pstMemManager?=?NULL;
????char?cInput?=?0;
????char?cDelete?=?0;
????int?nIndex?=?0;
????pstMemManager?=?MEM_ApplyMemory(9);
????for(;?nIndex?20;?nIndex++)
????{
????????cInput?=?‘a(chǎn)‘?+?nIndex;
????????if(MEM_AddData(pstMemManager?&cInput?sizeof(char))?==?0)
????????{
????????????printf(“%d:Add?Succeed!\n“nIndex);
????????}
????????else
????????{
????????????printf(“%d:Add?Failed!\n“nIndex);
????????}
????}
????//cDelete?=?‘s‘;
????cDelete?=?‘t‘;
????MEM_DeleteData(pstMemManager?&cDelete?sizeof(char));
????cDelete?=?‘s‘;
????MEM_DeleteData(pstMemManager?&cDelete?sizeof(char));
????cInput?=?‘G‘;
????MEM_AddData(pstMemManager?&cInput?sizeof(char
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????895??2014-08-14?12:48??MemoryAllo\main.c
?????文件???????5189??2014-08-14?12:47??MemoryAllo\MemoryAllo.c
?????文件????????928??2014-08-14?12:04??MemoryAllo\MemoryAllo.h
?????文件????????371??2014-08-14?02:05??MemoryAllo\MemoryAllo.pro
?????文件??????18284??2014-08-14?12:48??MemoryAllo\MemoryAllo.pro.user
?????目錄??????????0??2014-09-02?07:59??MemoryAllo
-----------?---------??----------?-----??----
????????????????25667????????????????????6
- 上一篇:C# EXCEL導(dǎo)入SQL
- 下一篇:c++ 用于讀取 excel 源碼
評論
共有 條評論