Thread: ERRATA TOPIC
View Single Post
  #1 (permalink)  
Old May 20th, 2006, 12:53 AM
tpangborn tpangborn is offline
Registered User
 
Join Date: May 2006
Location: Redding, CA, USA.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default ERRATA TOPIC

Errata: "Beginning Visual C++ 2005" p. 175
The outupt of Ex4_05.cpp is shown near the bottom. The addresses of &number1 and pnumber are shown to be 0012FEC8 and 0012FEBC, respectively. If one calculates the difference between the two addresses (C8-BC), the difference = 0x0000000C or 12(dec). As pointed out on p. 176 just below the midpoint of paragraph 6, the difference between &number1 and pnumber should be 4 bytes since they occupy adjacent memory locations for each [u]type long</u> variable. The last sentence of paragraph 6, p. 176, "The output demonstrates that everything is working as you would expect", is not true for the output of Ex4_05.cpp as written on p. 175. The good news is that the compliled and executed code on my computer showed the correct 4-byte spread between the addresses of &number1 and pnumber.

SilverFoxtor