// Using an inline function to
calculate.
// the volume of a cube.
#include
<iostream>
//
Definition of inline function cube. Definition of
//
function appears
before function is called, so a
//
function prototype is not required. First line of
//
function definition acts as the prototype.
inline double cube( const
double side )
{
return side * side * side; // calculate cube
} // end function cube