I just switched back to Linux after a few years of Windows use and am wondering if ANSI Escape Sequences are okay for coloring text. I ask because the way I did it on windows isn't capable of crossing platforms because of the use of windows.h.
Someone had mentioned NCurses or something but didn't explain it to me. Would this be a good alternative? Is there any negative aspects of NCurses or ANSI esc? Sorry if this question is dumb, I'm still a newbie.
This was the code I used for colored text on windows.
int setColor(const int foreground, const int background)
{
int Color = foreground + (background * 16);
HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleTextAttribute(hConsole, Color);
return 0;
}
Thanks, xChubz