全部博文(75)
分类: C/C++
2011-05-27 21:30:14
之前,wchar_t 是作为 unsigned short 来处理的,从vs2008开始,默认将其作为内置类型来处理。
如果想仍将其作为 unsigned short 的别名:则需要
/Zc:wchar_t-
When using QString::fromWCharArray(const wchar_t* , int size = - 1);
vs2005 gives the following error:
To fix this, go to Project --> Properties --> Configuration Properties -->
C/C++ --> Language, and set 'Treat wchar_t as Built-in Type' to No.
Hope it helps someone, it fixed my day...
原文链接