...
In this noncompliant code example, the programmer chooses to use a local version of the standard library but does not make the change clear.
| Code Block | ||||
|---|---|---|---|---|
| ||||
#include "stdio.h" /* confusing, distinct from <stdio.h> */ /* ... */ |
...
The solution addresses the problem by giving the local library a unique name (per recommendation PRE08-C. Guarantee that header file names are unique), which makes it apparent that the library used is not the original.
| Code Block | ||||
|---|---|---|---|---|
| ||||
/* Using a local version of stdio.h */ #include "mystdio.h" /* ... */ |
...