无法将参数1从'const char *'转换为'const wchar_t *'

时间:2016-09-26 02:39:46

标签: c++

这里我指的是Cstring.Format。有没有办法转换?当我使用它时,我收到以下错误

Woocommerce's

1 个答案:

答案 0 :(得分:3)

只需在字符串常量前添加L,将其标记为宽字符串:

strTemp.Format(L"Series: %d, Point: %d, X: %d, Y: %d", series, pointVal, x, y);