D
Dom
can someone please help me display text in the console
cout << "Testing";
in a different colour to the default one
cout << "Testing";
in a different colour to the default one
Dom said:can someone please help me display text in the console
cout << "Testing";
in a different colour to the default one
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.
[...]
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
Thomas Matthews said:[...]
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.
[...]
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.
In order for an ANSI standard for color, it must eitherWho said there was?
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.
Sure, but whose question does this fact answer?
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
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,
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.
WW said:[...]
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.
It is entirely off-topic *and* trolling. (Stating obviously
stupid thing just for the sake of argument.)
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.
That's wonderful. Or not. I'm not sure what your point is.
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?
WW said:[...]
Please keep your posts on the topc of C++.
[...]
Actually, I was being pragmatic.
You have been off-topic and trolling...
[...]
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 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.
[...]
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.
[...]
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.
[...]
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?
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.
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.
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?
Thomas Matthews said:[...]
These guys are getting irratating.
[...]
_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.
[...]
{Perhaps you should read my rant in Shiva's
Welcome.txt below.}
[...]
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.
[...]
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.)
[...]
This is support for the argument that Color isn't in the
ANSI C++ specification.
[...]
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.
[...]
[...]
In summary, color and the use of color is not discussed
in this newsgroup, nor it brethren
because it is a platform dependent
issue.
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.
[...]
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.
[...]
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.
[...]
Basic Usenet etiquette covers that. And if people want to
ignore etiquette, why should we help them?
[...]
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?
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.
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.
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.
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.
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.
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.
can someone please help me display text in the console
cout << "Testing";
in a different colour to the default one
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.
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 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.
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?
Yours.
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.
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.
LOL!! No, that's called an "invalid inference".
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".
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.
They read c.l.c++.m, like you should, if you only want to
see topical messages.
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.
[nonportable crap SNIPped]Teeyester said:A lot of techno going on here.......Try this
WW said:[nonportable crap SNIPped]Teeyester said:A lot of techno going on here.......Try this
Please do not post non-portable propriatery code to comp.lang.c++
Thanks again David B. Held! Good work!
Teeyester said:Well WW...
I must apoligize for my first post here then and my total failure to
recognize the format of this forum
WW said:
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.