C ++ and Java have very different standard libraries because they make very different assumptions about what they will be used for.
Java assumes that applications or applets will be launched on a host with a fully functional OS with a certain way to perform most normal actions.
It has a lot of content, for example, in java, the result is an application or applet. C ++ does not make this assumption, because C ++ can be used to build kernel cores and drivers for cores, it can be used to program real-time applications with a full stack on microcontrollers or processing units in supercomputers.
C ++ can be used to implement the operating system itself on which it will run.
For these reasons, the standard library implies almost nothing that it will be available, and therefore the standard library does not make any dependencies on these functions.
The only exception is with files and streaming, because almost any operating system, such as the stack, has something similar to a file stream, if it even has something like files.
If you need a richer set of OS Specific api, you need to look at something non-standard. A great choice is the foundation of Qt, which provides many tools similar to those found in Java libraries, is cross-platform and works well with native C ++ idioms.
source share