| Topic: |
DEVELOP > c-Plus-Plus |
| User: |
"" |
| Date: |
11 Dec 2004 12:09:26 PM |
| Object: |
cout implementation |
hi all,
Is it true that the cout function used in C++ for printing data
to the console is implemented via the "write" system call?
If not then how the cout function is implemented?
Thanks,
Candice
.
|
|
| User: "msalters" |
|
| Title: Re: cout implementation |
13 Dec 2004 10:02:18 AM |
|
|
wrote:
hi all,
Is it true that the cout function used in C++ for printing data
to the console is implemented via the "write" system call?
If not then how the cout function is implemented?
In Windows it will probably be WriteConsoleA; it doesn't have
a write() system call. Other systems don't have WriteConsoleA
so they may use other system calls. In DOS, you don't even
need a system call. You can simply create a pointer to the
screen and just copy the bytes.
Regards,
Michiel Salters
.
|
|
|
|
| User: "" |
|
| Title: Re: cout implementation |
11 Dec 2004 01:40:45 PM |
|
|
The implementation of cout is up to the person doing the
implementation. On UNIX (and similar) systems, it probably does use
write. On other systems, there is no system call named 'write'...
--
Later,
Jerry.
The universe is a figment of its own imagination.
.
|
|
|
|

|
Related Articles |
|
|