Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » what does cout stand for

This thread is locked; no one can reply to it. rss feed Print
what does cout stand for
Bradley Bergeron
Member #1,102
March 2001

Hey, was asked this today, what does cout stand for? it's a toss-up between console output and character output

Thanks
Hyjaked

Radagar
Member #2,768
September 2002
avatar

i vote console, but I'm not sure.

------------
Radagar - So your vote is for A.D.H.D.?
Chris Katko - Well, that was uninten--ooh kitty!

Steve Terry
Member #1,989
March 2002
avatar

Most likely console output, since most programs existed in console mode back in the days.

Another one... what does the "f" stand for in printf, I would guess "file" but printf doesn't go to a file, it goes to stdout.. of course stdout is a file stream... but still.

Ooh or what about argc, I mean you could name it whatever you want.. but that's the standard convention...

___________________________________
[ Facebook ]
Microsoft is not the Borg collective. The Borg collective has got proper networking. - planetspace.de
Bill Gates is in fact Shawn Hargreaves' ßî+çh. - Gideon Weems

mEmO
Member #1,124
March 2001
avatar

print formated

---------------------------------------------
There is only one God, and Connor is his son!
http://www.memocomputers.com
Happy birthday!

23yrold3yrold
Member #1,134
March 2001
avatar

Quote:

Ooh or what about argc, I mean you could name it whatever you want.. but that's the standard convention...

I'm guessing argc is argument count, and argv is argument variables ...

--
Software Development == Church Development
Step 1. Build it.
Step 2. Pray.

Steve Terry
Member #1,989
March 2002
avatar

Good point... hmm I always thought it was argument vector, but argument count makes sense.

___________________________________
[ Facebook ]
Microsoft is not the Borg collective. The Borg collective has got proper networking. - planetspace.de
Bill Gates is in fact Shawn Hargreaves' ßî+çh. - Gideon Weems

Chris Katko
Member #1,881
January 2002
avatar

Quote:

hmm I always thought it was argument vector,

That's what I've heard.

-----sig:
“Programs should be written for people to read, and only incidentally for machines to execute.” - Structure and Interpretation of Computer Programs
"Political Correctness is fascism disguised as manners" --George Carlin

Bradley Bergeron
Member #1,102
March 2001

any more comments on cout??

gillius
Member #119
April 2000

I would say console output, but cout is a character stream.

For an argument for "character out" there exist classes wout and win which are for wchar_t (wide characters, usually unicode). W here certainly doesn't stand for console, it stands for the "wide" in "wide character", so you could say wout is "wide character output" and then by extension make an argument for cout to be "character out".

Gillius
Gillius's Programming -- https://gillius.org/

Plucky
Member #1,346
May 2001
avatar

'argc' and 'argv' were first used by Kernighan and Ritchie in their seminal work "The C Programming Language", published in 1978. I don't recall the concept "vector" in C programming back then, until the development of C++ 5 years later.

Radagar
Member #2,768
September 2002
avatar

i thought they were like

Argument Count and
Argument Value

------------
Radagar - So your vote is for A.D.H.D.?
Chris Katko - Well, that was uninten--ooh kitty!

mEmO
Member #1,124
March 2001
avatar

dictionary.com said:

A quantity, such as velocity, completely specified by a magnitude and a direction.
A one-dimensional array.
An element of a vector space.

So I guess it's vector, then

---------------------------------------------
There is only one God, and Connor is his son!
http://www.memocomputers.com
Happy birthday!

kazzmir
Member #1,786
December 2001
avatar

The C programming language Second Addition said:

The first (conventionally called argc, for argument count) is the number of command-line arguments the program was invoked with; the second (argv, for argument vector) is a pointer to an array of character strings that contain the arguments, one per string.

So its argument count and argument vector. Case closed.

CGamesPlay
Member #2,559
July 2002
avatar

Print format, I think not formatted, as most function that end in f take a format string, and my definition of format is better than yours.... Or soemthing.

But the real question is, "how do you get the value from an MFC CString into a const char* function? As in,void foo(const char*); too fast(too furious) { CString s; foo(s.whatGoesHere() ? thanks() : !dang_you()); }Sorry for the deranged code."

--
Tomasu: Every time you read this: hugging!

Ryan Patterson - <http://cgamesplay.com/>

Billybob
Member #3,136
January 2003

CGamesPlay, an MFC CString will automatically convert into a const char *. :) i.e. foo(s);

CGamesPlay
Member #2,559
July 2002
avatar

omg. I was thinking it would, but I didn't see the operator on the MSDN page, and the ==, !=, <, =, etc were, so I guess I thought it wouldn't work. Can't believe I didn't try it. Thanks.

--
Tomasu: Every time you read this: hugging!

Ryan Patterson - <http://cgamesplay.com/>

A J
Member #3,025
December 2002
avatar

cout. (c)lever (o)mnivoures (u)se (t)ools.

___________________________
The more you talk, the more AJ is right. - ML

Joel Pettersson
Member #4,187
January 2004

I thought cout was short for c output, and cin short for c input.

23yrold3yrold
Member #1,134
March 2001
avatar

But cout isn't C. It's C++.

I would have voted for "character output".

--
Software Development == Church Development
Step 1. Build it.
Step 2. Pray.

Billybob
Member #3,136
January 2003

or it's
Class: Output
Class: Input

I always begin my class names with C, like CMouse.

23yrold3yrold
Member #1,134
March 2001
avatar

But they aren't classes. They're objects.

--
Software Development == Church Development
Step 1. Build it.
Step 2. Pray.

Matthew Leverton
Supreme Loser
January 1999
avatar

They're just dumb, meaningless names. Luckly, out sorta means out, and in sorta means in. And the C, well, that is just a short cut for "see."

cin // Let's see what comes in!
cout // Let's see what goes out!

Case closed!

(But, you may see it on a poll some day...)

Go to: