you also need to define _WIN32_WINNT before windows.h because many of the console functions depend on it. I think you need to be using either W2K or XP. If you are using Win95/98 those functions may not be available on your os.
Code:
#define _WIN32_WINNT 0x500
#include <windows.h>