On Sunday, 27 December 2015 at 03:34:18 UTC, riki wrote:
void ccf(const char* str){} void cwf(const wchar* str){}void main() { ccf("aaa"); //ok cwf("xxx"w); // error and why ? }
You need to remove the w suffix. Otherwise it is forcibly typed as a dynamic array and is no longer implicitly convertible.
void cwf(const wchar* str){} void main() { ccf("aaa"); //ok cwf("xxx"); // a string literal }