cout implementation



 DEVELOP > c-Plus-Plus > cout implementation

LINK TO THIS PAGE  


rating :  0   |  0


  Page 1 of 1

1

 
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.
.


  Page 1 of 1

1

 


Related Articles
 

NEWER

pg.1232     pg.940     pg.716     pg.544     pg.412     pg.311     pg.234     pg.175     pg.130     pg.96     pg.70     pg.50     pg.35     pg.24     pg.16     pg.10     pg.6     pg.3     pg.1

OLDER