posted 11 years ago
There is no cross-platform way to do it. There are ANSI codes which work on Unix type systems, but they don't work on Windows. To get it to work on Windows you will need a library of some sort. A good Google search should help you find the ANSI codes and several libraries for Windows to choose from (maybe JAnsi or something like that? I forget, bu there are multiple).