#include #include "memheap.h" using namespace std; int main(int argc, char *argv[]) { MemHeap1 mem(1000); double *p1, *p2, *p3; p1 = mem.allocate(); p2 = mem.allocate(); p3 = mem.allocate(); cout << "p1 @ " << p1 << "\n"; cout << "p2 @ " << p2 << "\n"; cout << "p3 @ " << p3 << "\n"; cout << "differences: " << p3-p2 << ", " << p2-p1 << "\n"; cout << "Capacity: " << mem.capacity() << "\n"; cout << "Used: " << mem.used() << "\n"; }