/* Initializing a Pointer * initialize_protect.cpp * Jan 16 2009 */ #include using namespace std; int main() { double x = 10.5, y; double* address = NULL; // not a WILD POINTER anymore.... // Any attempt to dereference the NULL address // generates a run-time error and halts execution. // Notice that didn't happen in initialize_bad.cpp example // address = &x; (commented out - this is a BAD thing) y = *address; cout << "The value stored in address " << address << " is " << y << endl; return 0; }