Original Post
Hey, was wondering if anyone could spare a cople seconds of time to give me hand. I'm trying to learn the basics of visual c++ and make a program to simply create a window. I can get everything to work except for giving windows class names and captions. My code for it is as follows: const char *WindowClass = "Main"; const char *WindowCaption = "Main Window"; then in my int PASCAL WinMain function I have window.lpszClassName = WindowClass; I'm getting an error that says error C2440: '=' : cannot convert from 'char *' to 'LPCWSTR' I was under the impression that LPCWSTR and a pointer to const char were basicly interchangable. I can solve the problem(kind of) by typecasting it, and changing the line to read: window.lpszClassName = LPCWSTR(WindowClass); It gets rid of the error, but dosnt really solve the problem, seeing as how you just end up with a bunch of garbage where the name should be. Thanks :)