C preprocessor: Difference between revisions

Content deleted Content added
Line 129:
For C, a header file is usually named with a <code>.h</code> extension. In C++, the convention for file extension varies with common extensions <code>.h</code> and <code>.hpp</code>. But the preprocessor includes a file regardless of the extension. In fact, sometimes code includes <code>.c</code> or <code>.cpp</code> files.
 
To prevent including the same file multiple times which often leads to a compiler error, a header file typically contains an [[include guard|{{mono|#include}} guard]] or if supported by the preprocessor [[pragma once|<code>{{mono|#pragma once</code>}}]] to prevent multiple inclusion.
 
==== Binary resource inclusion ====