Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jul 11th, 2008, 4:07 AM   #1
falcon eyes
Newbie
 
Join Date: Apr 2007
Posts: 1
Rep Power: 0 falcon eyes is on a distinguished road
How to change the color of my text

Hi Every Body i'm new member to this useful forum and want to ask some questions
i wrote the code

#include <iosystem>
using std::cout;
void main()
{
cout>> "Hello C++ World";
return 0;
}

it works ,but i didn't know
how to change the color of my text
how to show the carriage cursor
how to change the postion of the beginning of the text on the screen
so pls can some one help me.
falcon eyes is offline   Reply With Quote
Old Jul 11th, 2008, 5:06 AM   #2
grumpy
Programming Guru
 
grumpy's Avatar
 
Join Date: Jun 2005
Location: Adelaide, South Australia
Posts: 1,206
Rep Power: 5 grumpy is on a distinguished road
Re: How to change the color of my text

You need to read the sticky post in the C++ forum entitled "How to ask a question".

However, to answer your question: you can't, at least not in standard C++.

Text colour is manipulated in manners specific to your operating system, to the type of display or display driver, and non-standard library functions installed on your system or supported by your compiler.

You will need to read the documentation for your system, compiler, target display, etc and find the approach yourself.

Incidentally, the main() function is required to return int.
grumpy is offline   Reply With Quote
Old Jul 11th, 2008, 4:07 PM   #3
peaceofpi
hi: for(;;) goto hi;
 
peaceofpi's Avatar
 
Join Date: Jun 2006
Posts: 87
Rep Power: 3 peaceofpi is on a distinguished road
Send a message via AIM to peaceofpi Send a message via MSN to peaceofpi
Re: How to change the color of my text

Quote:
it works ,but i didn't know
How? cout>> "Hello C++ World"; is bullshit. Unless "iosystem" rolls that way. Big WTF
__________________
How do you play Religious Roulette?
Stand around in a circle and blaspheme till someone gets struck by lightning.
peaceofpi is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
i cant change text color in vc++ tamer1221 C++ 3 Apr 22nd, 2006 6:02 AM
how to change text colour in C chungchung C 6 Aug 16th, 2005 3:00 PM
How to detect cursor location and insert text??? syntax-error C# 3 Jun 30th, 2005 1:42 AM
Printing rich text with colored background jarrod C# 1 Feb 23rd, 2005 11:48 AM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 6:55 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC