?? 2dmemallocator.h
字號:
// 2DMemAllocator.h: interface for the C2DMemAllocator class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(C2DMEMALLOCATOR_H_INCLUDED_)
#define C2DMEMALLOCATOR_H_INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
/***********************************************************************
// C2DMemAllocator
//
// 二維數組動態分配(采用先整體分配,再指針定位思想)
//
// 分配函數:
// AllocMemory2D(T ** &p,int rows,int columns)
// 釋放函數:
// FreeMemory2D(T **&pp)
//
//----------------------------------------------
// 鄭元滿 jeny_man
// 2004/01/14
***********************************************************************/
class C2DMemAllocator
{
public:
C2DMemAllocator();
~C2DMemAllocator();
/*~~~~~~~~~分配函數~~~~~~~~~~~~~~~~~*/
//三個參數:
// p: [out],該函數分配成功的指針設置給p
//rows: [in], 行數
//cols: [in], 列數
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
static BOOL AllocMemory2D(float ** &p,int rows,int cols);
/*~~~~~~~~~釋放函數~~~~~~~~~~~~~~~~~*/
//釋放由AllocMemory2D()分配成功的內存空間
//一個參數:
// pp: [in],由AllocMemory2D()分配的內存指針
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
static void FreeMemory2D(float **&pp);
};
#endif // !defined(C2DMEMALLOCATOR_H_INCLUDED_)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -