You need to be running ANSI.SYS for those VT100 escape codes to work in a DOS console.
Presuming you are using Windows 2000 or later, somewhere in your console startup's autoexec.nt
file, you need to include the line
However, you are better off avoiding direct use of ANSI/VT100 control codes and programming the terminal properly. Google "msdn console functions" for stuff on Windows.
If you want to get really fancy, I recommend you check out the Curses library.
Win32, DOS, OS/2, Plan 9, etc.
NCURSES Programming HOWTO
Getting started with Curses
Remember that using the XSI standard Curses libraries means that it
controls the console, so you shouldn't use the C and C++ standard console I/O streams concurrently. (You can
use them elsewhere, of course, just don't mix them with console I/O.)
Hope this helps.