/* pointers.cpp provides a laboratory for experimenting with * addresses and pointers. * * Add other documentation from the Programming Style Sheet. *************************************************************************/ #include using namespace std; int main() { int int1 = 11, int2 = 22, int3 = 33; double dub1 = 1.23, dub2 = 7.89, dub3 = 1.23; cout << "int1, int2, int3:" << endl << int1 << " " << int2 << " " << int3 << "\n\n"; cout << "dub1, dub2, dub3:" << endl << dub1 << " " << dub2 << " " << dub3 << "\n\n"; /******************************************************************* * REMINDER: To display addresses (and pointers) in hexadecimal format, * it may be necessary to attach (void*) as a prefix to them in the * output statement; for example, * cout << (void*)&int1 << . . . * cout << (void*)intPtr << . . . ********************************************************************/ }