Source file inclusion

suggest change

The most common uses of #include preprocessing directives are as in the following:

#include <stdio.h>
#include "myheader.h"

#include is replaced by the contents of the named header. A name in angle brackets is searched for in implementation-defined places. A name in quotation marks is searched for in an implementation-defined place first, often the directory of the file that contains the directive, and then in the same places as a name in angle brackets. Either form can name a system header or a project header; the delimiters select the search, not the owner of the file.

A macro in the #include line is expanded, and that expansion can itself contain macros. The replacement must be a header name in quotes or angle brackets:

#if VERSION == 1
    #define INCFILE  "vers1.h"
#elif VERSION == 2
    #define INCFILE  "vers2.h"
    /*  and so on */
#else
    #define INCFILE  "versN.h"
#endif
/* ... */
#include INCFILE

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents