In my application i'm declaring a string variable near the top of my code to define the name of my window class which I use in my calls to RegisterClassEx, CreateWindowEx etc.. Now, I know that an LPCTSTR is a typedef and will eventually follow down to a TCHAR (well a CHAR or WCHAR depending on whether UNICODE is defined), but I was wondering whether it would be better to use this:
static LPCTSTR szWindowClass = TEXT("MyApp");
Or this:
static const TCHAR szWindowClass[] = TEXT("MyApp");
I personally prefer the use of the LPCTSTR as coming from a JavaScript, PHP, C# background I never really considered declaring a string as an array of chars.
But are there actually any advantages of using one over the other, or does it in fact not even make a difference as to which one I choose?
Thank you, in advanced, for your answers.