LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 10-05-2005, 02:40 PM   #1
twirl
Member
 
Registered: Aug 2005
Posts: 132

Rep: Reputation: 15
How to use colours in c++ ?


Hi,

I am trying to find out how do i change the colour of txt that the user sees in a c++ program file please? Thankyou

twirl
 
Old 10-05-2005, 03:21 PM   #2
sarin
Member
 
Registered: May 2001
Location: India, Kerala, Thrissur
Distribution: FC 7-10
Posts: 354
Blog Entries: 2

Rep: Reputation: 34
Are you talking about syntax highlighting? It is the property of the editor that you use. If you are using vi try ":help syntax" to see how it can be done. (I have never done it. Happy with what I get from vim ). If this is not syntax highlighting, just ignore this.

--Sarin
 
Old 10-05-2005, 08:36 PM   #3
twirl
Member
 
Registered: Aug 2005
Posts: 132

Original Poster
Rep: Reputation: 15
Hi,

Thankyou for your reply but i am on about changing the colour of text a user sees displayed on the screen.


twirl
 
Old 10-05-2005, 10:09 PM   #4
taylor_venable
Member
 
Registered: Jun 2005
Location: Indiana, USA
Distribution: OpenBSD, Ubuntu
Posts: 892

Rep: Reputation: 40
ANSI Colors

You could use some of the old-school ANSI escape sequences, though I'm not sure I'd recommend it if this app is going to be used in very diverse climates. Here's a link: http://rrbrandt.dyndns.org:60000/docs/tut/redes/?ansi I've used these before and they've worked for me.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Eterm colours Shafted Debian 3 10-24-2004 02:22 PM
What do the colours mean in the terminal? alaskazimm Mandriva 2 07-04-2004 07:34 AM
ls and colours when listing destin Slackware 5 12-23-2003 06:43 AM
Turn off colours ballus Linux - Newbie 5 08-12-2003 03:12 PM
Console colours joel112 Linux - Software 1 06-18-2003 04:12 PM


All times are GMT -5. The time now is 08:15 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration