f



What does 'c' in 'cout' mean?

Hi,

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

Thanks,
Peng

0
pengyu.ut (763)
10/19/2007 1:13:00 AM
comp.lang.c++ 49423 articles. 7 followers. Post Follow

11 Replies
1095 Views

Similar Articles

[PageSpeed] 34

On 10 19 ,   9 13 , "PengYu...@gmail.com" <PengYu...@gmail.com> wrote:
> Hi,
>
> I'm wondering what 'c' in "cout", "cin" mean? Does it mean "C++"? Or
> the 'c' in <cassert>?
>
http://www.research.att.com/~bs/bs_faq2.html#cout

0
dhb2000 (345)
10/19/2007 1:48:44 AM
"PengYu.UT@gmail.com" <PengYu.UT@gmail.com> wrote:

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

My guess is that it stands for "console".
0
daniel_t (1960)
10/19/2007 1:48:45 AM
* PengYu.UT@gmail.com:
> 
> 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

-- 
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?
0
alfps (7389)
10/19/2007 1:49:29 AM
On Oct 19, 1:49 pm, "Alf P. Steinbach" <al...@start.no> wrote:
> * PengYu...@gmail.com:
>
>
>
> > 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
>
> --
> 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

0
undbund (35)
10/19/2007 5:23:38 AM
On Oct 19, 6:13 am, "PengYu...@gmail.com" <PengYu...@gmail.com> wrote:
> 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.

0
10/19/2007 12:34:12 PM
sreedhar.dv@gmail.com wrote:
> On Oct 19, 6:13 am, "PengYu...@gmail.com" <PengYu...@gmail.com> wrote:
>> 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.
> 
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.

-- 
SM
rot13 for email
0
10/19/2007 3:25:30 PM
Shadowman wrote:

> sreedhar.dv@gmail.com wrote:
>> 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.

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

Markus
0
10/19/2007 4:57:31 PM
In message <4718e1fc$0$30379$9b4e6d93@newsspool4.arcor-online.net>
          Markus Moll <markus.moll@esat.kuleuven.ac.be> wrote:

> Shadowman wrote:

>> sreedhar.dv@gmail.com wrote:
>>> 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.

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

> Markus

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

Michael Bell


-- 
0
michael104 (366)
10/19/2007 9:07:24 PM
Michael Bell wrote:
> 
> 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>)?

-- 
Ian Collins.
0
ian-news (10155)
10/19/2007 9:47:50 PM
On 2007-10-19 17:07:24 -0400, Michael Bell <michael@beaverbell.co.uk> 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'.
> 

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.

-- 
  Pete
Roundhouse Consulting, Ltd. (www.versatilecoding.com) Author of "The 
Standard C++ Library Extensions: a Tutorial and Reference 
(www.petebecker.com/tr1book)

0
pete2666 (1733)
10/19/2007 10:21:18 PM
In message <5nsn06Fjej3bU4@mid.individual.net>
          Ian Collins <ian-news@hotmail.com> wrote:

> Michael Bell wrote:
>> 
>> 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>)?

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.

-- 
0
michael104 (366)
10/20/2007 5:46:42 AM
Reply: