Modules in C ++

Modules in C ++

Module - part of the program placed in a separate text file. In C ++, a module is split into two physical files:

• header file - with the extension .h,

• implementation file - with the extension .cpp.

The header file contains declarations of the exported elements of the module, and the implementation file contains their definitions as well as local declarations and definitions.

Modules are included in the program in their source or final version. Header modules included in the source release contain function declarations and implementations.

Modules should be conditionally compiled, so that the module code is included in the program only once.

Leave a Reply

Your email address will not be published. Required fields are marked *