What does 'c' in 'cout' mean?

P

PengYu.UT

Hi,

I'm wondering what 'c' in "cout", "cin" mean? Does it mean "C++"? Or
the 'c' in <cassert>?

Thanks,
Peng
 
A

Alf P. Steinbach

* (e-mail address removed):
I'm wondering what 'c' in "cout", "cin" mean? Does it mean "C++"? Or
the 'c' in <cassert>?

No, it's just a name prefix to avoid name collisions, I think from the
time before namespaces.

Cheers, & hth.,

- Alf
 
U

undbund

* (e-mail address removed):




No, it's just a name prefix to avoid name collisions, I think from the
time before namespaces.

Cheers, & hth.,

- Alf

--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?



cout -> character out
cin -> character in

Regards
 
S

sreedhar.dv

Hi,

I'm wondering what 'c' in "cout", "cin" mean? Does it mean "C++"? Or
the 'c' in <cassert>?

Thanks,
Peng


In cout and cin the charecter "C" represents Console.
 
S

Shadowman

In cout and cin the charecter "C" represents Console.
I doubt that. It just writes to a stream; the standard output stream in
this case. That usually also happens to be a console, but that's
system-dependent.

Stroustrup claims the 'c' stands for character.
 
M

Markus Moll

Shadowman said:
I doubt that. It just writes to a stream; the standard output stream in
this case. That usually also happens to be a console, but that's
system-dependent.

Stroustrup claims the 'c' stands for character.

Which surprisingly matches wcout for wide-character output. ;-)

Markus
 
I

Ian Collins

Michael said:
I read somewhere (but I can't find the source) that functions in C
which have been adopted into C++ have the letter 'C' put in front, so
'function' becomes 'cfunction'.
Can you name one? Maybe you are thinking of the standard library
headers (<stdio.h> -> <cstdio>)?
 
P

Pete Becker

I read somewhere (but I can't find the source) that functions in C
which have been adopted into C++ have the letter 'C' put in front, so
'function' becomes 'cfunction'.

It's a good thing you can't find the source, 'cause it's wrong. <g> We
did that with the C header names, but not with functions or variables.
 
M

Michael Bell

In message <[email protected]>
Ian Collins said:
Can you name one? Maybe you are thinking of the standard library
headers (<stdio.h> -> <cstdio>)?

Yes, you're right. I was thinking of standard library headers. But
'cout' and 'cin' seem so obviously 'out' and 'in' with a 'c' in front
that I thought the same must apply.

Michael Bell.

--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,010
Messages
2,570,273
Members
46,882
Latest member
VeronaMars

Latest Threads

Top