Hi Tosh,
Le Sat 28 Jun 1997, Tosh Maddox ‚crivait … Eric Brayeur sur Colors.
EB>> Can anyone tell me how to change the current color of cout ?
TM> I don't know what compiler you are using but, with Turbo C++,
TM> the manual states to use constrea.h to manipulate colors for
TM> streams, I don't know if there are any other ways to do it
TM> but it does work.
Yes, I use Borland C++ 3 and this works !
TM> #include
TM> int main(void)
TM> {
TM> constream out;
TM> out.clrscr();
TM> out << setbk(RED) << setclr(YELLOW);
TM> out << "This is yellow text with Red background" << endl;
TM> return 0;
TM> }
TM> The message was old so I don't know if you found another way,
TM> if you did, I would appreciate the way you found it to work.
Sorry, but I haven't found another way.
Thank you very much ...
Please, excuse my English :-)
---
---------------
* Origin: MiNiNET '97 - Belgium (2:293/4004.277)
|