#ifndef __ALLOCATOR_H__ #define __ALLOCATOR_H__ #include template class Allocator { public: static T * alloc(int n) { return (T*) calloc(n, sizeof(T)); }; static void free(T * & ptr) { free(ptr); ptr = 0; } }; #endif