=> Quoting Eric Brayeur to ALL on 04 Jun 97 04:41:53 <=
Hello Eric,
EB> Can anyone tell me how to change the current color of cout ?
I don't know what compiler you are using but, with Turbo C++, the manual
states to use constrea.h to manipulate colors for streams, I don't know if
there are any other ways to do it but it does work.
#include
int main(void)
{
constream out;
out.clrscr();
out << setbk(RED) << setclr(YELLOW);
out << "This is yellow text with Red background" << endl;
return 0;
}
The message was old so I don't know if you found another way, if you
did, I would appreciate the way you found it to work.
Thanks.
Tosh
... Get down and Modem the night away!
--- Blue Wave/DOS v2.30
---------------
* Origin: Tosh's Point Leupp, Arizona (1:2004/102.2)
|