我已經在此place下載了一些關於密碼過濾器的代碼。最初的項目是在vs2008和vs2010中編譯的。我更新到vs2012,我發現它不能被編譯。我該如何解決這個問題,謝謝。密碼過濾器無法在vs2012中編譯
這是錯誤消息:
Error 1 error C2440: '=' : cannot convert from 'char *' to 'TCHAR *' D:\SVN\branch\nobull-branch\util.cpp 72 1 passwdHk
Error 2 error C2664: 'int sprintf_s(char *,size_t,const char *,...)' : cannot convert parameter 1 from 'TCHAR *' to 'char *' D:\SVN\branch\nobull-branch\util.cpp 89 1 passwdHk
Error 3 error C2664: '_strdup' : cannot convert parameter 1 from 'TCHAR *' to 'const char *' D:\SVN\branch\nobull-branch\util.cpp 91 1 passwdHk
Error 4 error C2664: 'strlen' : cannot convert parameter 1 from 'TCHAR *' to 'const char *' D:\SVN\branch\nobull-branch\util.cpp 188 1 passwdHk
Error 5 error C2664: 'pshk_log_write_w' : cannot convert parameter 2 from 'const char [28]' to 'LPCWSTR' D:\SVN\branch\nobull-branch\util.cpp 202 1 passwdHk
Error 6 error C2664: 'strlen' : cannot convert parameter 1 from 'TCHAR *' to 'const char *' D:\SVN\branch\nobull-branch\util.cpp 208 1 passwdHk
Error 7 error C2664: 'strlen' : cannot convert parameter 1 from 'TCHAR *' to 'const char *' D:\SVN\branch\nobull-branch\util.cpp 211 1 passwdHk
Error 8 error C2664: '_strdup' : cannot convert parameter 1 from 'TCHAR *' to 'const char *' D:\SVN\branch\nobull-branch\util.cpp 224 1 passwdHk
Error 9 error C2664: 'strlen' : cannot convert parameter 1 from 'TCHAR *' to 'const char *' D:\SVN\branch\nobull-branch\util.cpp 229 1 passwdHk
Error 10 error C2446: ':' : no conversion from 'const char *' to 'TCHAR *' D:\SVN\branch\nobull-branch\util.cpp 249 1 passwdHk
Error 11 error C2664: 'int _snprintf_s(char *,size_t,size_t,const char *,...)' : cannot convert parameter 1 from 'TCHAR *' to 'char *' D:\SVN\branch\nobull-branch\util.cpp 249 1 passwdHk
Error 12 error C2664: 'int _snprintf_s(char *,size_t,size_t,const char *,...)' : cannot convert parameter 1 from 'TCHAR *' to 'char *' D:\SVN\branch\nobull-branch\util.cpp 254 1 passwdHk
我將charater設置爲unicode字符集,它的工作原理,謝謝。 – king
@@ LOL。將它改爲unicode是我沒有想到的。現在我想到了,如果它的目的是作爲unicode,並且你的新項目轉換沒有設置,那麼會發生同樣的問題。咄。那麼,至少你到了項目屬性編輯器的右邊部分來改變它。很高興我能夠至少幫你得到那麼多= P。 – WhozCraig