This is different from my last thread concerning new and delete. I have the proper syntax, and the program compiles perfectly fine, but even after I 'delete' my new intenger, it still works when I print it to the screen.

1.) #include <iostream.h>
2.) main()
3.) {
4.) int *a = new int; //Creates New Intenger 'a'
5.) cout << a;
6.) delete a;//Deletes Intenger 'a
7.) cout << a;//I thought this wouldn't work, but it did.
8.) return 0;
9.) }

Is the reason for this because 'delete' doesn't actually delete the new intenger, but it actually de-allocates the memory that was allocated for it?

Another thing: Printing 'a' to the screen only displays it's memory address. How do I create a new intenger that can be printed to the screen with it's value, rather than it's address?

Thanks for your time.