output in c++

change color of background in c++

Page 1 of 1

3 Replies - 4811 Views - Last Post: 26 November 2010 - 02:36 PM Rate Topic: -----

#1 ghcmtbca2009  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 26-November 10

output in c++

Posted 26 November 2010 - 01:59 AM

How to change the color of background in c++ language ,if we are using turbo c++ compiler.
Is This A Good Question/Topic? 0
  • +

Replies To: output in c++

#2 Linkowiezi  Icon User is offline

  • D.I.C Regular

Reputation: 58
  • View blog
  • Posts: 316
  • Joined: 07-October 08

Re: output in c++

Posted 26 November 2010 - 02:13 AM

Well, I've never used the Turbo IDE...
But from what I've heard it's pretty old and outdated so you should consider switching to a newer one.

I've never used CodeBlocks myself but from what I've heard it sound great and you can use it on multiple operating systems so it doesn't matter if you end up on a Windows, Mac or Linux machine.

Otherwise I'd recomend Eclipse which is javabased and worked well for me when I used it a coupple of years ago, and since it's made in java you can use it on anything that supports java.

Myself I use Emacs atm as a texteditor and GCC as compiler, for compiling on Windows i usually use Msys with MinGW.
But this is probably not an option for you since it can be rather confusing in the begining having to write your own makefiles + Emacs can take a while to get used to.

EDIT: The above goes for if you wish to change the background color in the text editor.
If I interpreted your question wrong and it was change the colors of a console program you've made, you should still consider switching to a newer one.
But onward with the answer: I really don't remember how to change the colors of a console program...
Altough I'd search the MSDN website for the syntax(if you're doing it for a Windows machine).

This post has been edited by Linkowiezi: 26 November 2010 - 02:28 AM

Was This Post Helpful? 0
  • +
  • -

#3 ZeroSixx  Icon User is offline

  • New D.I.C Head

Reputation: 3
  • View blog
  • Posts: 43
  • Joined: 04-March 10

Re: output in c++

Posted 26 November 2010 - 02:06 PM

Well, it really depends on the compiler. You should check out the libraries that your IDE contains via their help function.

Life is made much easier by grabbing the student version of Microsoft Visual Studios, it's system and console libraries are pretty massive.
Was This Post Helpful? 0
  • +
  • -

#4 #define  Icon User is offline

  • Duke of Err
  • member icon

Reputation: 1345
  • View blog
  • Posts: 4,631
  • Joined: 19-February 09

Re: output in c++

Posted 26 November 2010 - 02:36 PM

View Postghcmtbca2009, on 26 November 2010 - 09:59 AM, said:

How to change the color of background in c++ language ,if we are using turbo c++ compiler.


turbo c++ compiler/conio.h/conio2.h
For text output, you can use textbackground(int color).

conio2.h is almost the same as Turbo C/C++'s conio.h.

conio2.h File Reference
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1