![]() |
![]() |
![]() |
![]() |
![]() |
|
In Chapter 19, you learned about a version of analyze_trades
in which a subfunction works on a trade object handed over to the
subfunction by way of a pointer parameter. The value returned by the
subfunction is the product of the values in the price and
number structure variables:
*-- A value of type double is returned
|
v
double trade_price (struct trade *tptr) {
return tptr -> price * tptr -> number;
}