Console Colour

D

Dom

can someone please help me display text in the console

cout << "Testing";

in a different colour to the default one
 
A

Attila Feher

Dom said:
can someone please help me display text in the console

cout << "Testing";

in a different colour to the default one

C++ does not support colors. Please post this question to a programming
newsgroup dedicated to your platform.
 
D

David B. Held

Attila Feher said:
Dom said:
can someone please help me display text in the console

cout << "Testing";

in a different colour to the default one

C++ does not support colors.
[...]

No, but C++ is defined by an ANSI standard, it defines
behaviour when outputting to a "C++ console", and ANSI
defines how to make a console render text in different
colors. So in a roundabout way, I don't think it's entirely
off-topic. ;)

Here's a quickie:

cout << "\x1b[31mTesting\x1b[0m\n";

For more codes, Google for +ANSI +color.

Dave
 
T

Thomas Matthews

David said:
Dom said:
can someone please help me display text in the console

cout << "Testing";

in a different colour to the default one

C++ does not support colors.
[...]


No, but C++ is defined by an ANSI standard, it defines
behaviour when outputting to a "C++ console", and ANSI
defines how to make a console render text in different
colors. So in a roundabout way, I don't think it's entirely
off-topic. ;)

Here's a quickie:

cout << "\x1b[31mTesting\x1b[0m\n";

For more codes, Google for +ANSI +color.

Dave

Not again.
See: http://www.parashift.com/c++-faq-lite/input-output.html#faq-15.21

What about platforms that don't have consoles?
There is no requirement that a platform have a console.
If a platform _does_ have a console, there is no requirement that
the console be color. It _could_ be monochromatic and still be
compliant with ANSI C++. There is no requirement that a console
support the ANSI Escape sequences. Many Unix windowing programs,
as well as MS Windows and MacIntosh, don't support the ANSI Escape
sequences for a window.

Always search the FAQ and this newsgroup before posting:
http://groups.google.com/groups?q=c...ie=UTF-8&group=comp.lang.c++.*&sa=G&scoring=d

--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.raos.demon.uk/acllc-c++/faq.html
Other sites:
http://www.josuttis.com -- C++ STL Library book
http://www.sgi.com/tech/stl -- Standard Template Library
 
D

David B. Held

Thomas Matthews said:
[...]
What about platforms that don't have consoles?

What about them? I don't see anyone asking for color
codes for platforms without consoles.
There is no requirement that a platform have a console.

Who said there was?
If a platform _does_ have a console, there is no requirement
that the console be color.

That's all well and good. But the OP didn't ask how to set
color in a console that doesn't support it. Which is probably
a good thing.
It _could_ be monochromatic and still be compliant with
ANSI C++.

Sure, but whose question does this fact answer?
There is no requirement that a console support the ANSI
Escape sequences.

No, but most people who have a console that can support
color have a console that understands ANSI Escape sequences.
And giving an example of one is far more useful to the OP
than telling him that consoles are not required to support
escape sequences.
Many Unix windowing programs, as well as MS Windows
and MacIntosh, don't support the ANSI Escape sequences
for a window.
[...]

And I should hope that the OP either knows that or will
learn it, if in fact, that is important to him.

Dave
 
T

Thomas Matthews

David said:
[...]
What about platforms that don't have consoles?


What about them? I don't see anyone asking for color
codes for platforms without consoles.

These guys are getting irratating. Must be that endless September
issue.

_You_ don't understand. I wasn't replying to the OP's post, but
to yours. One of the reasons that color is not in the ANSI C++
specification is because there isn't a standard for color. Also,
placing it into the standard would require that all platforms
support these features. Which leads to my usual rant on color
afficinados.

{Perhaps you should read my rant in Shiva's Welcome.txt below.}

The Problems Of Color
---------------------
So far, color has not been "standardized". That is to say,
there isn't a standard method for representing color on a
computer (platform). There are so many fundamentals which
making a standard difficult. Listed below are some, but
not the only issues, involved with color.

1. Platforms that don't display information.
Many embedded systems do not have displays. They have
no need of displaying information. Many of these can
be found in household appliances as well as motion
controllers. A VCR display does not need to display
in more than one color, neither does a microwave oven.
Color cannot be required for those platforms that have
no need of it.

2. Displays: Vector & Raster {and others}
There is no common display. Some displays are vector
based others are raster. Color representation between
these two types are definitely different.

3. Monochrome displays.
There are many platforms out there that use a monochrome
display, such as photocopiers and DVD players. No need
to represent color on a platform that only supports
monochrome (i.e. one) color.

4. Color representation.
A pixel is a picture element. How many are required to
represent a color (such as aquamarine)? Some platforms
use one pixel per primary color, others have detailed
color information in the pixel. Which one is standard?

5. Bits per pixel.
How many bits per pixel to represent color? Some platforms
use one bit each for Red, Green, and Blue. Others use 8
bits for each color. Some also have bits for Orange and
Purple. What's the standard here? Cheap & small systems
don't have the memory for 8 bits per pixel. What are they
to do?

6. Subtractive or Additive Color?
Should the standard be based on Red, Green and Blue (such as
a display) or Cyan, Magenta and Yellow (like the printers
use)? What is the equivalence? When I was working at Adobe
with their Postscript systems, they had many tables for
conversion between RGB and CMY. They even had customers
that had printers using Orange and Purple.

7. Brilliance, Intensity, Reflection and other stuff.
Color also depends on intensity, and the transparency of
the medium. A picture printed on 20lb linen paper looks
different when printed on a high gloss stiff paper.

8. Color identification and naming.
A while back, many companies, such a Adobe Systems, Kodak,
Pantone, and others were holding joint meetings for a
proposal of color identifiers. For example, what are the
attributes of Mauve? How is Mauve represented on a: RGB
display, ink jet printer, laser jet printer, film recorder,
thermal transfer color printer and a scanner?

Who said there was?
In order for an ANSI standard for color, it must either
require a platform to have a display/console or provide
exclusions for those that don't.

That's all well and good. But the OP didn't ask how to set
color in a console that doesn't support it. Which is probably
a good thing.

I wasn't referring to the OP. I was referring your reply
which gave information about an ANSI driver. _I_ know that
color isn't standard. I asked _you_ how to set color on a
platform that doesn't support color, since you have an attitude
that Color is standardized (or at least there is an ANSI
specification for color, which there isn't. See rant above.)


Sure, but whose question does this fact answer?

This is support for the argument that Color isn't in the
ANSI C++ specification. Although the easiest method is
to perform a text search on the electronic form of the
ANSI C++ specification. I'm willing to give in if you can
quote the section that describes color in the C++ standard.


No, but most people who have a console that can support
color have a console that understands ANSI Escape sequences.
And giving an example of one is far more useful to the OP
than telling him that consoles are not required to support
escape sequences.

Actually, referring the OP to a newsgroup that discusses
his/her platform is more helpful. I still haven't found
a requirement for a Window in MS Windows to support the
ANSI Escape Sequences. Last time I played with the Ansi
Escape Sequences, they required a driver be loaded. If
the driver wasn't loaded, the Escape Sequences just looked
like garbage and sometimes killed the application.

Many Unix windowing programs, as well as MS Windows
and MacIntosh, don't support the ANSI Escape sequences
for a window.
[...]


And I should hope that the OP either knows that or will
learn it, if in fact, that is important to him.

Dave

In summary, color and the use of color is not discussed
in this newsgroup, nor it brethren
because it is a platform dependent
issue. There is no mention of how to use color nor
requirements of color in the ISO specification of either
language. Color representation is difficult by itself
due to the many factors involved. Perhaps one day,
there will be a standard for color in which turquoise,
mauve and peach can be displayed on an RGB screen,
LCD display and laser printer all looking the same.


--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.raos.demon.uk/acllc-c++/faq.html
Other sites:
http://www.josuttis.com -- C++ STL Library book
http://www.sgi.com/tech/stl -- Standard Template Library
 
W

WW

David said:
Attila Feher said:
Dom said:
can someone please help me display text in the console

cout << "Testing";

in a different colour to the default one

C++ does not support colors.
[...]

No, but C++ is defined by an ANSI standard,

No. C++ is defined by an ISO/IEC and ANSI joint standard.
it defines behaviour when outputting
to a "C++ console",

No, it does not. It defines behavior of the standard output stream and has
*absolutely no idea* of any console.
and ANSI
defines how to make a console render text in different
colors.

OK. Then post to a comp.lang.c++.plus.everything.else.ansi

Here we talk *only* C++. Platfom dependent things should be discussed where
the platform is discussed. Here we discuss the *language*.

BTW my platform has no ANSI terminal. And it has terminal. Wow.
So in a roundabout way, I don't think it's entirely
off-topic. ;)

It is entirely off-topic *and* trolling. (Stating obviously stupid thing
just for the sake of argument.)
 
D

David B. Held

WW said:
[...]
Here we talk *only* C++. Platfom dependent things
should be discussed where the platform is discussed. Here
we discuss the *language*.

I imagine you saying this part with your nose in the air.
BTW my platform has no ANSI terminal. And it has
terminal. Wow.

That's wonderful. Or not. I'm not sure what your point is.
It is entirely off-topic *and* trolling. (Stating obviously
stupid thing just for the sake of argument.)

Actually, I was being pragmatic. I would say the self-
appointed "moderators" of this *unmoderated* group are
the trolls. In fact, I would say that c.l.c++.m is better-
moderated than this group, and it's considerably more
lenient. Between you and Mr. Matthews, you have spent
about 5 times more energy saying why color is a taboo
subject in C++ than I did giving the OP a probably useful
reply while redirecting him to other resources. That tells
me that you are less interested in talking about C++ than
you are in policing talk about C++. Since the group is
not moderated, you can't prevent people from asking
questions that are in the FAQ or the newsgroup guidelines
or any other document you choose to cite. So instead
of being a bunch of self-righteous pricks, why don't you
let people who choose to be helpful be helpful, and spend
that time answering more questions?

Dave
 
W

WW

David said:
WW said:
[...]
Here we talk *only* C++. Platfom dependent things
should be discussed where the platform is discussed. Here
we discuss the *language*.

I imagine you saying this part with your nose in the air.

Please keep your posts on the topc of C++. if you whish to exercise your
attempted humor, go to the alt.flame newsgroup.
That's wonderful. Or not. I'm not sure what your point is.

You have missed the point. it is not my point. It is yours too. As long
as you use this newsgroup.
Actually, I was being pragmatic.

You have been off-topic and trolling...
I would say the self-
appointed "moderators" of this *unmoderated* group are
the trolls.

....and continue trolling.
In fact, I would say that c.l.c++.m is better-
moderated than this group, and it's considerably more
lenient.

Try asking there about color printing and then post an answer with
non-postable terminal characters. I'd really love seeing Francis get you.
Between you and Mr. Matthews, you have spent
about 5 times more energy saying why color is a taboo
subject in C++ than I did giving the OP a probably useful
reply while redirecting him to other resources.

I have spent the time thanx to you off-topic trolling. Shitting is OK you
say - it is part of nature. All right, but then do not wonder if someone
does it in your living room.
That tells
me that you are less interested in talking about C++ than
you are in policing talk about C++.

Certainly. That is why I have worked my ass off for years to get into the
C++ committee, to visit all possible conferences and all the 3 of The C++
Seminar. I *am* interested in talking about C++. That is why I wish that
off-topic troll like yourself would just get out of here and leave me time
to answer/read those posts which are about C++.

You may not have a life I have one. And I would rather spend my short free
time on constructive work in here rather than trying to find on-topic posts
in all the junk.
Since the group is not moderated, you can't
prevent people from asking questions that
are in the FAQ or the newsgroup guidelines
or any other document you choose to cite.

Yes. But if they are not assholes - unlike some - and if they are informed
that they should post their C++ language questions here and the rest
elsewhere they will do so. If they are asshole they keep arguing.
So instead
of being a bunch of self-righteous pricks,

F**k you man.
why don't you
let people who choose to be helpful be helpful, and spend
that time answering more questions?

So why don't you crawl back to whereever you crawl out from and *leave us*
here so that we will *have time* to answer questions because we do not need
to waste it reading your fallacies? If you do not wish to participate in a
C++ language newsgroup then please do not waste thousands of people's time
by trolling.

I have no trouble with people giving redirection and giving also an
off-topic answer if they know it. If you care to look you will see I do it
myself if the answer is short. But I do have trouble with people arguing
the topicality of clearly off-topic things and I do have trouble believing
the good intentions of those. And I do count fallacies like yours that all
ANSI standards belong here.

So decide if you want to be part of the problem or part of the solution.
The problem here is that there are some days over 500 posts and many of
those is waste of time to download or look at, because they have nothing to
do with the purpose of this newsgroup. The other problem is people - like
you - who support those instead of trying to keep the volume on a managable
level.

Many C++ experts do not read this newsgroup due to the sheer volume of
off-topic messages. We can all say thanx to those people for that who are
encouraging off-topic threads. Like you.
 
D

David B. Held

WW said:
[...]
Please keep your posts on the topc of C++.

Why don't you do the same? This thread has degenerated
from a topic that was questionably about C++ to a topic
that is completely unrelated to C++, and you and Mr.
Matthews are primarily responsible.
[...]
Actually, I was being pragmatic.

You have been off-topic and trolling...

I see. So it's more important to bend your will to the
newsgroup gestapo then spend a few lines of text giving
someone a useful pointer. Because being helpful makes
you a "troll". Well, I'd much rather continue this "trolling"
thread and annoy every self-appointed moderator of this
group than stop helping people when it's easy and
convenient to do so. If you don't like that, you are free
to create a moderated newsgroup where you actually
have control over the content.
[...]
Try asking there about color printing and then post an
answer with non-postable terminal characters. I'd really
love seeing Francis get you.

I'm sure you would, because you seem to be sadistic like
that. But frankly, I see numerous threads there that have
little to do with the C++ language itself. Here are some
examples:

Thread safe strings? (as you know, C++ is thread-agnostic)
compiling difference b/w G++ and VC++ (platform-
specific thread)
Protecting or hiding a username and password in C++
(obviously not a C++-specific issue)
Ideas for a midterm and final projects (in C++, but
clearly not a language question)
g007: banning profane language in C++ source code
(not C++-specific)
"frame memory" malapropism? (tangentially related to
C++
IDE for C++ (about as relevant to C++ as color console
output)

Note that even on these questionable threads (which don't
annoy me in the least), even the more "conservative"
posters don't go off on tirades about how the topic isn't
100% related to the newsgroup. Basically, people in
c.l.c++.m have better things to worry about.
[...]
I have spent the time thanx to you off-topic trolling.

But you make it sound like I'm the only person trolling
here. I think your posts are also troll-worthy.
Shitting is OK you say - it is part of nature. All right,
but then do not wonder if someone does it in your living
room.

So if I had said this instead of you, would that make me
a troll?
[...]
You may not have a life I have one. And I would rather
spend my short free time on constructive work in here
rather than trying to find on-topic posts in all the junk.

Well, if you had left it alone, you would have seen exactly
two "off-topic" posts in this thread. But now there are 6
such posts, only half of which were written by me. Not
to mention that you spent all the time writing some of them.
So it seems to me that you would rather spend your "short
free time" policing the group and creating more off-topic
nonsense for *other* people to skip over than merely
dealing with the content that interests you. And if the
off-topic content bothers you so much, why don't you just
read c.l.c++.m instead?
[...]
Yes. But if they are not assholes - unlike some - and if
they are informed that they should post their C++
language questions here and the rest elsewhere they will
do so. If they are asshole they keep arguing.

Hmm...all of my posts have a reply...I wonder what that
means?
[...]
F**k you man.

Umm...who's the troll?
[...]
So why don't you crawl back to whereever you crawl out
from and *leave us* here so that we will *have time* to
answer questions because we do not need to waste it
reading your fallacies?

In this thread, I'm the only person who answered a question.
You and Mr. Matthews spent 5 posts saying why I shouldn't
have answered it. If you have less time to answer interesting
questions, whose fault is that?
If you do not wish to participate in a C++ language
newsgroup then please do not waste thousands of people's
time by trolling.

I see. So answering questions constitutes "trolling", but
policing an umoderated group constitutes "participation".
Wow, the net changes so fast I can't keep up with all the
definitions.
I have no trouble with people giving redirection and giving
also an off-topic answer if they know it. If you care to look
you will see I do it myself if the answer is short. But I do
have trouble with people arguing the topicality of clearly
off-topic things and I do have trouble believing the good
intentions of those.

Oh, you're absolutely right. My whole intention all along was
to bring a flood of off-topic posters to c.l.c++. You caught
me. The answer I gave *was* short, you gave no redirection,
and I never said it was on-topic. Also, you apparently don't
know what a smiley is.
And I do count fallacies like yours that all ANSI standards
belong here.

LOL!! No, that's called an "invalid inference".
So decide if you want to be part of the problem or part of
the solution. The problem here is that there are some days
over 500 posts and many of those is waste of time to
download or look at, because they have nothing to do with
the purpose of this newsgroup.

Ask yourself if any of your posts might fall into that category,
and then ask yourself if you are being "part of the problem or
part of the solution".
The other problem is people - like you - who support those
instead of trying to keep the volume on a managable
level.

Hey, I didn't say: "By all means continue to ask your color-
related questions here." I redirected the OP to a useful
Google search. If there's an unmanageable volume, I'd say
it's because group cops like you double the amount of off-
topic posts.
Many C++ experts do not read this newsgroup due to the
sheer volume of off-topic messages.

They read c.l.c++.m, like you should, if you only want to
see topical messages.
We can all say thanx to those people for that who are
encouraging off-topic threads. Like you.

I defy you to show how I "encouraged" off-topic threads.
Of all the people that have posted after me on this thread,
none of them have asked for further information about
color. And none of them have contributed to C++
discussion either.

Dave
 
K

Kevin Goodsell

David said:
[...]
Here we talk *only* C++. Platfom dependent things
should be discussed where the platform is discussed. Here
we discuss the *language*.


I imagine you saying this part with your nose in the air.

If you don't like the topic of this group, you should go elsewhere. I
can't imagine why you'd want to stay here if you don't like the topic
being discussed.
Actually, I was being pragmatic. I would say the self-
appointed "moderators" of this *unmoderated* group are
the trolls.

Then you need to check the definition of "troll".
In fact, I would say that c.l.c++.m is better-
moderated than this group,

Brilliant observation, seeing as how this group is not moderated.
and it's considerably more
lenient. Between you and Mr. Matthews, you have spent
about 5 times more energy saying why color is a taboo
subject in C++ than I did giving the OP a probably useful
reply while redirecting him to other resources.

This is the point. We are equipped to deal with C++ issues. We are (as a
group) pretty good at solving people's issues with C++. We are NOT good
at answering every random question some jerk who can't be bothered to
find an appropriate group feels like asking.

Off-topic posts (and people like you who seem to think we should expand
the group to deal with anything and everything) make the group less
useful *because* they take so much energy that would otherwise be spent
helping people with C++ problems.

What is the point of having a topic at all if we don't stick to it? It's
what we're good at. There are other people in other groups who are good
at other things. If we allowed every topic under the sun, we wouldn't be
able to help anyone.
That tells
me that you are less interested in talking about C++ than
you are in policing talk about C++.

You are wrong. We would be perfectly happy if the off-topic posts would
stop so we could discuss the topic we come here to discuss. That's
precisely why we enforce topicality rules.
Since the group is
not moderated, you can't prevent people from asking
questions that are in the FAQ or the newsgroup guidelines
or any other document you choose to cite.

Why the hell should we have to? Basic Usenet etiquette covers that. And
if people want to ignore etiquette, why should we help them?
So instead
of being a bunch of self-righteous pricks, why don't you
let people who choose to be helpful be helpful, and spend
that time answering more questions?

Because off-topic posting is NOT helpful. It's rude and disruptive.

You complain about people not getting helped, yet you want to open the
group up to questions that 1) we aren't well-equipped to answer and 2)
will increase the already high traffic, making it more difficult for
anyone to get a question answered? How would that help anyone?

-Kevin
 
D

David B. Held

Thomas Matthews said:
[...]
These guys are getting irratating.

I agree. Mr. "Attila" have turned one post with questionable
topicality in to a newgroup gestapo beat-down.
[...]
_You_ don't understand. I wasn't replying to the OP's
post, but to yours.

Oh, I understand that. I was merely trying to imply that
your post on the relevance of color to C++ really isn't
helpful to anyone. I guess sutbtlety is lost on the internet.
One of the reasons that color is not in the ANSI C++
specification is because there isn't a standard for color.

Well, you're answering a question that wasn't asked, but
maybe people will find that fact useful anyway.
Also, placing it into the standard would require that all
platforms support these features.

Nonsense. As you yourself later note, some platforms
don't make provision for displaying output. The standard
does not require them to do so, even when a program
executes statements which are defined to produce output.
That's because it would be silly to say: "Platforms which
do not produce visible output cannot have a conforming
C++ implementation". In the same manner, it would be
silly to say that color output couldn't be defined by the
standard because some platforms don't support color
output.
[...]
{Perhaps you should read my rant in Shiva's
Welcome.txt below.}

While that's all very interesting, I'm sure, it has even less to
do with C++ than the original post. And yet it's hundreds
of times longer.
[...]
In order for an ANSI standard for color, it must either
require a platform to have a display/console or provide
exclusions for those that don't.

Well, given that that's true (and I'm not going to sit here
and challenge it, because this is already horribly off-topic),
how does that prove that I said that platforms are required
to have a console?
[...]
I wasn't referring to the OP. I was referring your reply
which gave information about an ANSI driver. _I_ know
that color isn't standard. I asked _you_ how to set color
on a platform that doesn't support color, since you have
an attitude that Color is standardized (or at least there is
an ANSI specification for color, which there isn't. See
rant above.)

Well, I'm sorry I displayed that "attitude" towards you, but
here is what I SAID:

"...and ANSI defines how to make a console render
text in different colors..."

I never said how to make a *specific* color, or that it will
render color text on *all* consoles. Obviously, it was
implied that the color codes are only suitable for consoles
which support the ANSI escape sequences, and those
sequences *are* standard, regardless of whether the exact
color values rendered are or not. Since I doubt the OP is
trying to color-match his console output to a Pantone sample,
I think my answer was at least somewhat helpful. Launching
a discourse on whether or not color displays can be
standardized and whether C++ should or should not
attempt to address the issue did not seem useful to the OP,
so I didn't bother to observe every facet of pedantry available
to me.
[...]
This is support for the argument that Color isn't in the
ANSI C++ specification.

And that's probably a good argument, but it's also a straw
man. Congratulations, Don, I think he's dead.
[...]
Actually, referring the OP to a newsgroup that discusses
his/her platform is more helpful.

And would be possible if I knew what his/her platform was.
Giving an example and then referring to a relevant Google
search seems even more helpful to me.
I still haven't found a requirement for a Window in MS
Windows to support the ANSI Escape Sequences.
[...]

Who says the OP's platform was Windows?
[...]
In summary, color and the use of color is not discussed
in this newsgroup, nor it brethren
because it is a platform dependent
issue.

And yet you and Mr. "Attila" have managed to discuss it
at some length. You, in particular, have offered far more
information on color than anyone asked for. While it
makes for an interesting read, it hardly puts you in a position
to argue for topical posts.

Dave
 
D

David B. Held

Kevin Goodsell said:
[...]
In fact, I would say that c.l.c++.m is better-
moderated than this group,

Brilliant observation, seeing as how this group is not
moderated.

Not in the formal sense, but in practical terms, this group is
more heavily moderated than many I've seen. It's just that
the "moderators" don't have the power to block or cancel
messages.
[...]
Off-topic posts (and people like you who seem to think
we should expand the group to deal with anything and
everything)

I never once said that the group should be expanded. I
answered a question and gave a half-hearted justification
for doing so. How that translates into blowing the doors
off the newsgroup and letting in the unwashed masses is
something that can only be fathomed by the minds of the
newsgroup gestapo, I suppose.
make the group less useful *because* they take so much
energy that would otherwise be spent helping people with
C++ problems.

In my experience, people who are not helped go away.
In my opinion, telling every off-topic poster that he's off-
topic, instead of merely failing to answer the question
doubles the amount of noise on the group.
What is the point of having a topic at all if we don't stick
to it?

The problem is that topics are not defined with a sharp
boundary. Some topics are more relevant than others.
What people consider topical depends at least partly on
subjective values, even if the topic as a whole is fairly
clear.
It's what we're good at. There are other people in other
groups who are good at other things. If we allowed every
topic under the sun, we wouldn't be able to help anyone.

Yes, but you can't really "disallow" off-topic posts, so I
don't really see the utility of spending bandwith to say:
"That's off-topic". Many of the people who post off-topic
messages do so as a first question anyway (and haven't
read anything that would tell them their question is off-topic),
and thus they are unlikely to be deterred by such posts.
People who actually read other posts and would be likely to
see such "moderating" messages are already more likely to
post only relevant topics anyway. That's why I don't
understand the zeal to moderate an unmoderated group.
[...]
You are wrong. We would be perfectly happy if the off-
topic posts would stop so we could discuss the topic we
come here to discuss. That's precisely why we enforce
topicality rules.

But you don't enforce them. You only post annoying
messages about off-topic posts. Frankly, I'm more
annoyed by the large number of such messages than I
am by the off-topic posts. The people who start off-topic
threads usually only post once and go away, never
having learned their lesson and unlikely to learn it. The
ones who post topicality messages apparently have not
learned that such people are not going to be deterred,
because you can't get at them before they decide to post.
[...]
Basic Usenet etiquette covers that. And if people want to
ignore etiquette, why should we help them?

You shouldn't. But why should you waste so much effort
flogging people who do? Do you *really* think you are
increasing the s/n ratio by your actions?
[...]
Because off-topic posting is NOT helpful. It's rude and
disruptive.

Which is what I would call this meta-thread.
You complain about people not getting helped, yet you
want to open the group up to questions that 1) we aren't
well-equipped to answer and 2) will increase the already
high traffic, making it more difficult for anyone to get a
question answered? How would that help anyone?

Again, I never said that I want to "open the group up to
[off-topic] questions". When I complained abut people
not getting help, it was because the newsgroup cops were
offering information that may be technically correct, but
not useful to the person asking the question. I don't give
a rip if people don't respond to off-topic posts. In fact,
I expect that as the status quo. But if they *do* respond,
it seems it would be more useful for everyone if they
gave a *helpful* response rather than a pedantic response
with questionable practical benefit.

Dave
 
K

Kevin Goodsell

David said:
[...]
Off-topic posts (and people like you who seem to think
we should expand the group to deal with anything and
everything)


I never once said that the group should be expanded. I
answered a question and gave a half-hearted justification
for doing so. How that translates into blowing the doors
off the newsgroup and letting in the unwashed masses is
something that can only be fathomed by the minds of the
newsgroup gestapo, I suppose.

(I don't want to turn this into a flame war. Sorry if my previous
message was overly harsh.)

Off-topic answers are, in many ways, worse than off-topic questions. We
want to discourage off-topic questions, not encourage them. Also,
answers posted on this group are expected to be standard and portable. A
non-standard solution has a good chance of being taken for a standard
solution.
In my experience, people who are not helped go away.
In my opinion, telling every off-topic poster that he's off-
topic, instead of merely failing to answer the question
doubles the amount of noise on the group.

In may experience, people who are not helped ask their question again.
Sometimes people who *are* helped do.

You are right that off-topic redirection messages make up too many of
the posts here. But the goal is to solve the problem of off-topic
posting. People who are scolded for being off topic aren't likely to
make the same mistake again (here or elsewhere, hopefully). People who
are about to be off-topic may even notice the scolding of someone else
and refrain from posting their off-topic message.

I don't think the solution is to ignore the messages. I definitely think
answering off-topic questions in counter-productive. I also think that
being rude is often counter-productive, but I don't blame regulars for
being frustrated with the volume of OT posts, or the lack of etiquette
of the people posting the OT messages.

A polite but firm redirection is the best solution, IMHO.
The problem is that topics are not defined with a sharp
boundary. Some topics are more relevant than others.
What people consider topical depends at least partly on
subjective values, even if the topic as a whole is fairly
clear.

I find that the group is not completely inflexible, and not always in
agreement about what is topical. Messages that are borderline topical
often get ignored by the "OT police" or replied to with a, "Well, this
isn't strictly topical, but..." I don't think there's really a problem
here. The general topic is clear. Borderline topics don't usually invoke
the wrath of the pseudo-mods. I think this arrangement is OK.
Yes, but you can't really "disallow" off-topic posts, so I
don't really see the utility of spending bandwith to say:
"That's off-topic". Many of the people who post off-topic
messages do so as a first question anyway (and haven't
read anything that would tell them their question is off-topic),

This is the problem. These people need to learn some netiquette.
and thus they are unlikely to be deterred by such posts.
People who actually read other posts and would be likely to
see such "moderating" messages are already more likely to
post only relevant topics anyway. That's why I don't
understand the zeal to moderate an unmoderated group.

The goal is to keep the noise minimal, as well as maintain the topic of
the group (by preventing topic drift). I don't think there's a better
option. I don't believe "ignore it and it will go away" will work here.
But you don't enforce them. You only post annoying
messages about off-topic posts. Frankly, I'm more
annoyed by the large number of such messages than I
am by the off-topic posts. The people who start off-topic
threads usually only post once and go away, never
having learned their lesson and unlikely to learn it. The
ones who post topicality messages apparently have not
learned that such people are not going to be deterred,
because you can't get at them before they decide to post.

We do the best we can. Sorry if it annoys you. I don't believe leaving
people to go post off-topic messages somewhere else is the way to handle
OT posters. Another problem is that all the off-topic messages make this
group show up in Google searches for things that are completely
off-topic here. We've had people say "I thought this would be a good
place to ask because when I put [some search terms] into Google, this
group came up." Besides that, emphasizing the topic increases the
chances that people will notice that their question is not topical
before they post.
[...]
Basic Usenet etiquette covers that. And if people want to
ignore etiquette, why should we help them?


You shouldn't. But why should you waste so much effort
flogging people who do? Do you *really* think you are
increasing the s/n ratio by your actions?

Well, I don't flog. (At least, not lately. I may have done so in the
past.) I politely redirect. I even say "please".
[...]
Because off-topic posting is NOT helpful. It's rude and
disruptive.


Which is what I would call this meta-thread.

At least it's topical.
Again, I never said that I want to "open the group up to
[off-topic] questions". When I complained abut people
not getting help, it was because the newsgroup cops were
offering information that may be technically correct, but
not useful to the person asking the question.

It is useful. It helps them figure out what the scope of the language
is, and where the best place to get help for question outside that scope
is (or at least, where it is *not*).
I don't give
a rip if people don't respond to off-topic posts. In fact,
I expect that as the status quo. But if they *do* respond,
it seems it would be more useful for everyone if they
gave a *helpful* response rather than a pedantic response
with questionable practical benefit.

Off-topic replies are part of the problem, not part of the solution.

I'm afraid the off-topic redirections come with the territory here. I'm
sorry if you don't like them, but they aren't going to go away unless
(miraculously) the OT posting stops.

-Kevin
 
T

Teeyester

can someone please help me display text in the console

cout << "Testing";

in a different colour to the default one


Dom........

A lot of techno going on here.......Try this

#include <iostream>
#include <conio.c> // for getch(); & clrscr();
using namespace std;

void printat(int ,int , char *);

int main()
{
clrscr();
textcolor(12); //sets text color
textbackground(9 ); //sets text background
cout <<" Here we go !! \n\n"; //colored printf
getch();
textcolor(12+BLINK); //uses blinking
textbackground(1);
cout <<" And One more time !\n\n";
getch();
textcolor(14+BLINK);
textbackground(13);
cout << " Look out for another color \n\n";
printat(24,70,"Teeyester");
getch();
}

void printat(int row,int col, char s[])
{
gotoxy(col,row);
cprintf("%s",s);
}

//The different color codes are


//0 BLACK
//1 BLUE
//2 GREEN
//3 CYAN
//4 RED
//5 MAGENTA
//6 BROWN
//7 LIGHTGRAY
//8 DARKGRAY
//9 LIGHTBLUE
//10 LIGHTGREEN
//11 LIGHTCYAN
//12 LIGHTRED
//13 LIGHTMAGENTA
//14 YELLOW
//15 WHITE

..........code came from planet source code, so I still haven't figured
out the blinking part(maybe API or something) but the original
question was how to get color in text in DOS without API's
 
W

WW

David B. Held wrote:
[SNIP]
I see. So it's more important to bend your will to the
newsgroup gestapo then spend a few lines of text giving
someone a useful pointer.

If you would read posts here for other purposes than picking up a good
trolling place for yourself you would know that this is not true.
Because being helpful makes you a "troll".

No. Being an asshole stating that everything belongs here which is covered
by any of the ANSI standards belongs here does. Keeping arguing about your
off topic post (which you have stated as on-topic) when you clearly know it
was off-topic is. What makes *you* a troll is wasting peoples time and
posting deliberate flame baits.
Well, I'd much rather continue this "trolling"
thread and annoy every self-appointed moderator of this
group than stop helping people when it's easy and
convenient to do so.

Get a wife and start crewing her. We have enough jerks in this NG without
you.
If you don't like that, you are free
to create a moderated newsgroup where you actually
have control over the content.

Actually I have control over the content here as well. I just choose not to
killfile you, because I know that your fake-liberal postings will encourage
the thankx-to-god-sleeping jerks who used to create 50+ posts Windows
programming threads.

The problem is that you are not liberal as you try to put it. You come into
a group which has its own ground rules and you try to change them to those
of yours. That it either a self-absorbed consrvative (who cannot imagine
that there can be anything else than what he thinks is good) or an
anarchist. Neither one is needed in a technical newsgroup.
[...]
Try asking there about color printing and then post an
answer with non-postable terminal characters. I'd really
love seeing Francis get you.

I'm sure you would, because you seem to be sadistic like
that. But frankly, I see numerous threads there that have
little to do with the C++ language itself. Here are some
examples:

Thread safe strings? (as you know, C++ is thread-agnostic)

As you know, C++ is being changed. Threads are being added.

In addition threads like that are not rejected here either by most. If you
care to look into the thread not only picking up subject lines which seem to
support you you would see that the posts are *not* about threads programming
but about where is C++ heading and why could a string fail in MT.
compiling difference b/w G++ and VC++ (platform-
specific thread)

No, it is not. It is concentrating on the standard compliance of two
compilers and portability. *Not anything* platform specific.
Protecting or hiding a username and password in C++
(obviously not a C++-specific issue)

Obviously... did you care to look at more than the subject?
Ideas for a midterm and final projects (in C++, but
clearly not a language question)

No. And such questions are asked and answered here as well.
g007: banning profane language in C++ source code
(not C++-specific)

It is C++ specific. It is guideline James Bond... sorry 007 in a series of
proposed guidelines for C++ programmers.
"frame memory" malapropism? (tangentially related to
C++ IDE for C++ (about as relevant to C++ as
color console output)

That thread had nothing to do with C++ IDEs. It is an attempt to clarify if
a term means anything or not.
Note that even on these questionable threads (which don't
annoy me in the least), even the more "conservative"
posters don't go off on tirades about how the topic isn't
100% related to the newsgroup. Basically, people in
c.l.c++.m have better things to worry about.

Basically yes. In there the jerks stating that ANSI consolse codes belong
to the topic of ANSI C++ are cut off before they reach the air. So yes,
clcm can be more liberal on topics, because it will still be a moderated
discussion.

But then again within the topics you have picked up above there are only two
questionable at first sight but one of them is part of a set and the other
is terminology clarification.
[...]
I have spent the time thanx to you off-topic trolling.

But you make it sound like I'm the only person trolling
here. I think your posts are also troll-worthy.

You think wrong. Wouldn't be the first case.
So if I had said this instead of you, would that make me
a troll?

No. What makes you a troll is to provoke these.
[...]
You may not have a life I have one. And I would rather
spend my short free time on constructive work in here
rather than trying to find on-topic posts in all the junk.

Well, if you had left it alone, you would have seen exactly
two "off-topic" posts in this thread.

Two as the 4 posts exchanged between you and Thomas plus the 5th original
off-topic post? Beware I do not count your answer to the original as
off-topic. It was only trolling/silly to state that ANSI terminals are
topical here.
But now there are 6
such posts, only half of which were written by me.

Yeah. You have just described how trolls work. Look: people have started
to correct you and not me, and that started the avalanche.
Not
to mention that you spent all the time writing some of them.

Sure. That is why I said that do not waste our time with trolling. We have
to respond for a while to make sure newbies will not be mislead and sleeping
troll encouraged by your fallacies. Then we might killfile or ignore you if
it seems to be hopeless to make you think.
So it seems to me that you would rather spend your "short
free time" policing the group and creating more off-topic
nonsense for *other* people to skip over than merely
dealing with the content that interests you.

Keeping the topicality of the group is not off-topic. And no, I am rather
not, but I go in the order as posts show up and I feel that it is also my
responsibility to keep this group on-topic. So it is yours.
And if the
off-topic content bothers you so much, why don't you just
read c.l.c++.m instead?

I read that too. But it starts to hit me that you actually suggest that
people who want to discuss the C++ language in peace here should go away and
that off-topic ranters and trolls stay. Do you see the Fe in it?
[...]
Yes. But if they are not assholes - unlike some - and if
they are informed that they should post their C++
language questions here and the rest elsewhere they will
do so. If they are asshole they keep arguing.

Hmm...all of my posts have a reply...I wonder what that
means?

Means you are successfull in trolling?
[...]
F**k you man.

Umm...who's the troll?

You. Let's not take things out of context:
So instead
of being a bunch of self-righteous pricks,

F**k you man.
[...]
So why don't you crawl back to whereever you crawl out
from and *leave us* here so that we will *have time* to
answer questions because we do not need to waste it
reading your fallacies?

In this thread, I'm the only person who answered a question.

Yes. But unfortunately in addition to this you have stated that all ANSI
standards are topical here.
You and Mr. Matthews spent 5 posts saying why I shouldn't
have answered it.

I did not. I have spent two posts (3 with that) to tell that your statement
about ANSI terminals being topical here is false.
If you have less time to answer interesting
questions, whose fault is that?
Yours.


I see. So answering questions constitutes "trolling",

No. Stating obvious bullshit as truth does. It is the definition of
trolling. Starting flame wars with such a flame bait does.
but
policing an umoderated group constitutes "participation".

Yes. Metat-talk is topical.
Wow, the net changes so fast I can't keep up with all the
definitions.

Better look for another job. You would make a perfect IRS official. AFAIK
they also drive people crazy.
Oh, you're absolutely right. My whole intention all along was
to bring a flood of off-topic posters to c.l.c++. You caught
me.

I know.
The answer I gave *was* short, you gave no redirection,
and I never said it was on-topic.

David:"No, but C++ is defined by an ANSI standard, it defines
behaviour when outputting to a "C++ console", and ANSI
defines how to make a console render text in different
colors. So in a roundabout way, I don't think it's entirely
off-topic."

Short? Not rtue. Never said it was on-topic? Not true.

WW:"Please post this question to a programming
newsgroup dedicated to your platform."

I never gave a redirection? Not true.
Also, you apparently don't know what a smiley is.

Apparently I do know.
LOL!! No, that's called an "invalid inference".

Read your post.
Ask yourself if any of your posts might fall into that category,
and then ask yourself if you are being "part of the problem or
part of the solution".

Unlike you I do that vefore I post.
Hey, I didn't say: "By all means continue to ask your color-
related questions here." I redirected the OP to a useful
Google search. If there's an unmanageable volume, I'd say
it's because group cops like you double the amount of off-
topic posts.

You stated that ANSI terminals are topical here. I have never had problem
with yopu *answering* the question and giving redirection as I have already
told you.
They read c.l.c++.m, like you should, if you only want to
see topical messages.

I am sorry, but since when do you decide what do I read?
I defy you to show how I "encouraged" off-topic threads.

Think. It might be unusual thing to do but believe me it is worth of it.
Of all the people that have posted after me on this thread,
none of them have asked for further information about
color. And none of them have contributed to C++
discussion either.

They have contributed to discourage posting fallacies - like yours is about
ANSI reminals being topical - to this newsgroup.
 
W

WW

Teeyester said:
A lot of techno going on here.......Try this
[nonportable crap SNIPped]

Please do not post non-portable propriatery code to comp.lang.c++

Thanks again David B. Held! Good work!
 
T

Teeyester

WW said:
Teeyester said:
A lot of techno going on here.......Try this
[nonportable crap SNIPped]

Please do not post non-portable propriatery code to comp.lang.c++

Thanks again David B. Held! Good work!


Well WW...
I must apoligize for my first post here then and my total failure to
recognize the format of this forum

"Off-topic answers are, in many ways, worse than off-topic questions.
We
want to discourage off-topic questions, not encourage them. Also,
answers posted on this group are expected to be "standard" and
"portable". A
non-standard solution has a good chance of being taken for a standard
solution."

I am fairly new to C++ myself and browsed this forum trying to
learn a thing or two. Dom's original post said nothing about being
portable or standard..He merely asked about a way to change text
color(something I recently was experimenting with myself).....Us new
people have to do that....So I thought I would post something however
non-portable or non-standard that might give him an insight of where
to begin looking.......because reguardless of the techicnal aspects of
whether C++ does or dosen't support color, eventually most of us want
to find out how to do whatever is necessary to change color.

It would appear that this forum is probably over my head and since
you seem to reguard David B. Held in high reguard, he posted some good
advise for newbies a couple of post above.

"In my experience, people who are not helped go away. In my opinion,
telling every off-topic poster that he's off-topic, instead of merely
failing to answer the question doubles the amount of noise on the
group."

So I shall heed his advise and respectfully ....go away .....
 

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
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top