#ifndef __AUTOARRAY_H__
#define __AUTOARRAY_H__

#include <stdlib.h>

class AutoArray {
public:
     inline AutoArray(int, int);
     inline ~AutoArray() { delete [bytes] (char *) data; };
     inline void *Data() { return data; };
private:
     int bytes;
     void *data;
};

inline AutoArray::AutoArray(int typesize, int elements)
{
     bytes = typesize*elements;
     data = (void *) new char[bytes];
     if (data == NULL)
	  abort();
}

/* DO NOT ADD ANYTHING AFTER THIS #endif */
#endif /* __AUTOARRAY_H__ */
