simple message box error

I just want to make a message box pop up with a custom message. My compiler says
--
error: cannot convert 'const wchar_t*' to 'LPCSTR {aka const char*}' for argument '2' to 'int MessageBoxA(HWND, LPCSTR, LPCSTR, UINT)'|
--
heres my code:
1
2
3
4
5
6
7
8
9
10
#include <Windows.h>

int main(){
MessageBox(
        NULL,
        L"Message",
        NULL,
        NULL
    );
}

--
help.
Last edited on
You're using the wrong character type. MessageBox takes TCHARs, not wide chars.

See this for detailed explanation:
http://www.cplusplus.com/forum/windows/106683/
Last edited on
I can't possibly say how much I appreciate the help!
Topic archived. No new replies allowed.