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 or
config.nt file, you need to include the line
DEVICE=C:\WINDOWS\system32\ansi.sys
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.
PDCurses
Win32, DOS, OS/2, Plan 9, etc.
http://pdcurses.sourceforge.net/
NCurses
POSIX
http://www.gnu.org/software/ncurses/
NCURSES Programming HOWTO
Getting started with Curses
http://tldp.org/HOWTO/NCURSES-Programming-HOWTO/
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.