.H headers (for example, iostream.h ) are deprecated in favor of "modern" style headers ( iostream ). This ensures that the implementation does not have to provide headers in the form of a file physically located on disk. You can choose any suitable implementation.
For example, <math.h> requires the implementation to provide a file with this name, but if you specify only <cmath> , the implementation can provide math utilities as it sees fit without a physical file.
In addition, .h headers place their declarations in the global namespace, while non-.h headers place their declarations in the std . As a result, new headers are unlikely to cause name conflicts.
Change Basile Starynkevitch in a comment, this concept is not limited to C ++, but the C standard also supports it.
Masked man
source share