Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
SetTextColor(hdc, RGB(0, 0, 0)); char str[20]=""; sprintf(str, "sorce: %d", sorce); TextOut(hdc, 930, 810, str,strlen(str));
char* を LPCWSTR に変換できないというエラーが表示されました。どうすれば解決できますか?
LPCWSTR の W は、ワイド文字を意味します。いくつかのオプションがあります。
char 型の使用から wchar_t に変更できます
codecvt または Win32 API を使用して変換できます
char 型を使い続けるには、TextOutA を使用します。