Home Segments Index Top Previous Next

416: Mainline

Crucially, the value of a new expression is the address of the memory that new has allocated. Consequently, you can tie a pointer variable to a run-time–allocated chunk of memory for a floating-point number using an assignment statement:

 *----- Refers to a memory location that can hold the address 
 |      of a chunk of memory allocated for a floating-point number 
 | 
 |      *----- Returns the address of a chunk of memory allocated 
 |      |      for a floating-point number at run time 
 v      v 
dptr = new double;