// allocate3darray.h // Allocate3DArray by David Maisonave (609-345-1007) (www.axter.com) /* Description: Allocate3DArray creates a 3 dimensional dynamic array of any type. Example Usage int x = 4; int y = 6; int z = 8; float ***My3DFloat = ALLOCATE3DARRAY(float, x, y, z); int***My3DInt = ALLOCATE3DARRAY(int, x, y, z); The Free3DArray function is an efficient method for freeing memory allocated via Allocate3DArray Free3DArray(My3DFloat); Free3DArray(My3DInt); */ #ifndef ALLOCATE3DARRAY_H_HEADER_GUARD_ #define ALLOCATE3DARRAY_H_HEADER_GUARD_ #define ALLOCATE3DARRAY(Type, x, y, z) (Type***)Allocate3DArray(sizeof(Type), x, y, z) void ***Allocate3DArray(int TypeSize, int x, int y, int z); void Free3DArray(void*** Array); #endif //!ALLOCATE3DARRAY_H_HEADER_GUARD_