♦ C++ Modules
♣ About C++ Modules
There 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 Syntax
Below is the representation of C++ Modules Syntax.Basic Syntax
Syntax Explanation:
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