What is a module?

I find it difficult to understand the concept of modules. Are they translation units? Do they like .ccp and .h files ?.

My textbook describes: “Modular design consists of a set of modules that are developed and tested separately. Modular programming implements modular designs and is supported by both procedural and object-oriented languages. The C programming language supports the modular design through library modules consisting of functions. The stdio module provides input and output support, while hiding its implementation details, as a rule, the scanf () and printf () implementation are sent in binary form along with the comp The header of the stdio.h file provides an interface that is everything you need to complete our source code.This chapter describes how to create a module in object-oriented languages ​​using C ++, how to compile the source code for each module separately, and how to link compiled code into a single executable binary The chapter completes the unit test example on a module.

MODULES

A well-designed module is a very cohesive unit that freely connects to other modules. The module addresses one aspect of the software solution and hides as many details as possible. The compiler converts the source code of the module, regardless of the source code for other modules, into its own binary code block.

+5
source share
1 answer

In this context (i.e., a general English feeling), a module is what makes other things form a whole; that since the definition goes without additional specification.

If you are reading this, as there is some concept called "module" baked in C ++, not yet (yet). The author simply describes how “everything comes together” when you chat about different libraries, etc. In one complete program.

The wording you quoted does not actually say much of the beneficial substance.

+7
source

Source: https://habr.com/ru/post/1275419/


All Articles