Using typedef (cont)
The use of parallel arrays works in limited cases
- not too many arrays
- care taken to ensure that indexes used consistently
In this example, a better approach would be
- define a single object to represent each worker
- define an array of
Worker objects
|