At this point, two readers, read_trade_price
and
read_trade_size
, and one nonreader, trade_price
,
all exhibit a parameter that is assigned to a trade
object's address.
As you learned in Segment 393, you can, if you like, replace the
trade_price
nonreader by a readerlike function named
read_total_cost
:
double read_total_cost (struct trade *tptr) { return tptr -> price * tptr -> number; }