Vincent Fatica
2010-05-24 23:49:35 UTC
With these, I can compile, getting no complaint about a function, error(),
declared to take a LPTSTR. (UNICODE and _UNICODE are defined.)
.H: extern const LPWSTR foo;
.CPP const LPWSTR foo=L"bar";
But when I use these,
.H extern LPCWSTR foo;
.CPP LPCWSTR foo=L"bar";
I get
error C2664: 'error' : cannot convert parameter 1 from 'LPCWSTR' to 'LPTSTR'
Conversion loses qualifiers
Why? Aren't "LPCWSTR" and "const LPWSTR" both "const WCHAR*"?
Thanks.
declared to take a LPTSTR. (UNICODE and _UNICODE are defined.)
.H: extern const LPWSTR foo;
.CPP const LPWSTR foo=L"bar";
But when I use these,
.H extern LPCWSTR foo;
.CPP LPCWSTR foo=L"bar";
I get
error C2664: 'error' : cannot convert parameter 1 from 'LPCWSTR' to 'LPTSTR'
Conversion loses qualifiers
Why? Aren't "LPCWSTR" and "const LPWSTR" both "const WCHAR*"?
Thanks.
--
- Vince
- Vince