// ptr1.cpp By: Aiman Hanna - ©1993-2006 Aiman Hanna // A very simple pointers' program, however it does not work! Why? // Key Points: 1) Pointers. #include int main() { int *p, *q; *q = 5; p = q; cout << *p << "\n"; return 0; } // The result of compiling the program on HP_UX // CC: "ptr1.cpp", line 11: warning: q used but not set (116) // The result of running the program on HP-UX /* Bus error(coredump) */ // On Windows, no warning will be given but the program will crash when // you attempt to run it