379338 (1) [Avatar] Offline
#1
Hi all,

I'm working through the book and I'm currently on chapter 5. In code listing 5.46 an example is given that it is not always possible to get the memory address of a value. A new "duration" type is created with an int base type. Lines 19 and 20 of the listing then show the error message returned when trying to get the memory address of "duration(42)". The error states that it cannot take the address of the "duration(42)" expression.

The text following the code listing does not then explain why it is not possible to get the address of "duration(42)". Why is it not possible to get the memory address of that expression result?

Thanks for your help