cout implementation

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • candy_init@yahoo.com

    #1

    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

  • Rolf Magnus

    #2
    Re: cout implementation

    candy_init@yaho o.com wrote:
    [color=blue]
    > Is it true that the cout function used in C++ for printing data
    > to the console is implemented via the "write" system call?[/color]

    Maybe, or maybe not. That depens on the compiler/OS/library/...
    Some OSs don't even have a "write" system call.
    [color=blue]
    > If not then how the cout function is implemented?[/color]

    The C++ standard doesn't define that. It's up to the implemenation to decide
    where the output of cout goes.

    Comment

    Working...