.c
file. However, it cannot access members
of struct Frac
.
The consumer code may look like the following:
#include "frac.h" ... Frac *length, *width, *area; // create length, width and area length = newFrac(); width = newFrac(); area = newFrac(); // initialize length, width Frac_mult(length, width, area); // ...
Any consumer source code needs to be compiled, and linked with
an object file provided by the provider. In this example, for the
consumer code to work, its object file must be linked with
frac.o
.