473,406 Members | 2,345 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

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

Jul 22 '05 #1
1 1806
ca********@yahoo.com wrote:
Is it true that the cout function used in C++ for printing data
to the console is implemented via the "write" system call?
Maybe, or maybe not. That depens on the compiler/OS/library/...
Some OSs don't even have a "write" system call.
If not then how the cout function is implemented?


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

Jul 22 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Toro | last post by:
Hi, I want to control the output such that it always print at the same line, erasing the line just printed (or erasing a particular posistion at a certain line). Say, for a simple program like...
1
by: regisser | last post by:
Is it true that cin,cout, etc are initialized on first use? And that no runtime initialization before main is needed; the first time the object is accessed, it grabs dynamic memory typically like 1K...
5
by: Marc Schellens | last post by:
I want to create an object, which replaces std::cout all output will be put out to std::cout, but optional also copied to a file. But the file output needs to be manipulated: every new line...
3
by: puzzlecracker | last post by:
In one of my applications, I was mixing perror (cerrno )with cout(iostream) calls and sometimes getting unordered output. The exact context was to print an error condition as well as cause for...
2
by: nrhayyal | last post by:
Hello experts, are cout and printf and other ostream and stdio functions/libraries are threadsafe? i am using gnu gcc3.3.2 on AIX5.2. and my applications are multithreaded applications. i am...
2
by: Hai Ly Hoang [MT00KSTN] | last post by:
I have a C++ console program which has a lot of output (no input) like this: cout << "Strings here". Now i want to turn this application to windows application (with gui) and I want to bring the...
12
by: Filipe Sousa | last post by:
Hi! Could someone explain to me why this operation is not what I was expecting? int main() { int x = 2; std::cout << x << " " << x++ << std::endl; return 0; }
2
by: Ralf Goertz | last post by:
Hi, can I mix output to cout and wcout? It seems that if I write to cout first it works fine but if I start with wcout the output to cout vanishes. I assume that is has to do with the...
3
by: worlman385 | last post by:
why when I use cout, I must put - using std::cout; #include <iostream> using std::cout; if i look at iostream, it seem cout is defined in iostream - __PURE_APPDOMAIN_GLOBAL extern _CRTDATA2...
58
by: Mark Casternoff | last post by:
I'm getting back into C++ after a long hiatus (they didn't have namespaces back then). I know this question is completely subjective, but I'd be interested in hearing which is the "better"...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.