我需要让代码同时支持宽字符和窄字符,所以需要控制L的使用
1 #define WIDESTRPREFIX L 2 std::wstring aa = L"ABC"; 3 std::wstring bb = WIDESTRPREFIX"ABC";
这段代码会提示这样的错误
第三行: 3 error C2065: 'L' : undeclared identifier
业精于勤,荒于嬉;行成于思,毁于随。
I don’t know why your code doesn’t work, I just know that this way of writing is fine
#define WIDESTRPREFIX(a) L##a std::wstring bb = WIDESTRPREFIX("ABC");
I don’t quite understand the purpose of this. Maybe I can use a template?
C++14? operator""
I don’t know why your code doesn’t work, I just know that this way of writing is fine
I don’t quite understand the purpose of this. Maybe I can use a template?
C++14? operator""