♦ C++ Modules
♣ About C++ ModulesThere exist some libraries in C++, which provide Class Structures and methods for the convenience of programming.
These libraries are imported as modules for usage in the program.
For example, iostream is a very basic library which is almost compulsory for the program.
There exist other additional libraries such as string, fstream, cstdio, etc.
♣ C++ Modules SyntaxBelow is the representation of C++ Modules Syntax.
standard_library : library provided by C++ user_library : library created by user
♣ Creating Cutom Module in C++Custom Module can be created and used, and to take it far can be distributed.
For creating a Module follow the following listed steps:-
- Create a file with "h" extension. For example machine.h
- Store all the Classes/Structures and Function/Methods inside the file