I've got a C program that demonstrates changing text color with ANSI escape codes. It works like this:
Code:
#include <stdio.h>
int main()
{
int i = 0;
for (i = 31; i <= 37; i++)
{
printf("\033[0;%dmHello!\033[0m\n", i);
printf("\033[1;%dmHello!\033[0m\n", i);
}
}
I'm wondering how to do something like this in C++, using cout. Anybody know?