what is modules? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

what is modules?

🙏

20th Jun 2016, 2:03 AM
Panchal JaTiN
Panchal JaTiN - avatar
3 Answers
+ 1
The first answer actually answered the question "What is the modulo operator?" not "What is a module?". Therefore I will answer the question "What is a module?". A module is a new concept which is evaluated for C++17 at the moment. clang++ 3.9 and the Visual Studio compiler (I think not the one bundled with Visual Studio 2015 but updated later on) implements it. Taken from the clang 3.9 module feature description: "Modules provide an alternative, simpler way to use software libraries that provides better compile-time scalability and eliminates many of the problems inherent to using the C preprocessor to access the API of a library."
20th Jun 2016, 11:26 AM
Stefan
Stefan - avatar
+ 1
Ok, to improve on the answer "What is modulo?": modulo is an operation which will give you the remainder of division. modulo is expressed by the "%" operator and can only be applied to integer numbers. An example: int remainder = 11%4; // remainder=3, as 11=4*2+3 I hope this and my other answer help to understand what "modulo" or "modules" in C++ is.
1st Jul 2016, 1:44 AM
Stefan
Stefan - avatar
- 1
11=4*2+3 ,so,11%4=3 ;and,11%5=1,11%6=0……
20th Jun 2016, 5:48 AM
张林
张林 - avatar