// pointers05.cpp #include int* AllocateInt(int initialValue) { int* p = new int(initialValue); return p; } void DeallocateInt(int* p) { delete p; } int main() { int* ptr = 0; ptr = AllocateInt(42); std::cout << *ptr << std::endl; *ptr = 24; std::cout << *ptr << std::endl; DeallocateInt(ptr); return 0; }