[問題] C++ 編譯時遇到的變數轉換錯誤
開發平台(Platform): (Ex: VC++, GCC, Linux, ...)
VC++ 6.0
額外使用到的函數庫(Library Used): (Ex: OpenGL, ...)
已經載入下列函數庫
#include <sstream>
#include <iostream>
#include <string>
#include <stdio.h>
#include "windows.h"
#include "mq.h"
#include "tchar.h"
#include "wchar.h"
問題(Question):
原始碼是從VS2010複製過來的
在VS2010可以正常編譯
但在VC++ 6.0編譯發生以下錯誤訊息
已上網查過必要載入函數庫
並沒有解決,
不知道是還有其他函數庫沒有載入
還是環境配置上要設定
程式碼(Code):(請善用置底文網頁, 記得排版)
http://codepad.org/QgClsAco
顯示56行 error C2065: '_snwprintf_s' : undeclared identifier
http://codepad.org/kZFqZ1IV
顯示6行 error C2065: 'CT2CA' : undeclared identifier
補充說明(Supplement):
還請各位先進不吝指教,謝謝
如果有違背版規的地方,請告知,會立即修改
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 60.248.200.131
※ 文章網址: https://www.ptt.cc/bbs/C_and_CPP/M.1461664246.A.AF9.html
※ 編輯: Kanyahi (60.248.200.131), 04/26/2016 17:51:39
→
04/26 21:05, , 1F
04/26 21:05, 1F
第一個code是send MSMQ
所以會用到windows.h 所以才加入
在想會不會是因為大小寫的關係?
※ 編輯: Kanyahi (220.129.51.245), 04/26/2016 21:51:28
→
04/26 22:34, , 2F
04/26 22:34, 2F
推
04/27 13:03, , 3F
04/27 13:03, 3F
→
04/27 13:50, , 4F
04/27 13:50, 4F
→
04/27 13:51, , 5F
04/27 13:51, 5F
CT2CA 我有想到可能是因為VC6沒支援的關係 所以已經改了
改成_snwprintf有出現
cannot convert parameter 3 from 'unsigned long' to 'const unsigned short *'
把原本的第二個參數dwBufferLength刪掉就可以了
感謝回覆的幾位先進幫忙
※ 編輯: Kanyahi (60.248.200.131), 04/27/2016 14:34:52