wchar_t is a macro windows uses to replace it with either "CHAR" or "WCHAR" when UNICODE is defined. MSDN says that UNICODE is defined by default. My question is....what header file is this defined in? and how do i undefine it if i want the compiler to replace every occurance of wchar_t with "CHAR" c++ ANSI data type?

wchar_t is a macro windows uses to replace it with either "CHAR" or "WCHAR" when UNICODE is defined.

I believe you mean TCHAR. wchar_t is a keyword in C++.

MSDN says that UNICODE is defined by default.

When you create a new project from a template in Visual Studio. This can be turned off in the project's properties for character set. Otherwise you're required to define it yourself either as a compiler switch or within the source code.