*
brightoceanlight@hotmail.com (Gil) schriebt:[color=blue]
>
> Is 'system' in stdlib.h the only way to make OS calls
> from C++?[/color]
In one sense yes, namely that the standard library is defined
without reference to any particular OS, and that the language
does not directly support OS calls.
In another sense no, namely that 'system' as well as the i/o
facilities in the C and C++ standard libraries in practice uses
OS calls when suitable OS calls are available; they can be
regarded as abstractions over the OS, whatever the OS is.
In a third sense, the OS is probably mostly implemented in C
and/or C++, and a system-specific compiler (as most compilers
are...) will provide some system-specific means of making OS
API calls.
[color=blue]
>
> In this case, I will probably be making unix calls like
> 'df' or 'statvfs' to get the diskspace information and
> redirecting it to a file, and then opening and reading
> the output.[/color]
How to do that is off-topic in this group, but generally, you just
include the relevant headers and link with the appropriate libs.
--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?