[問題] C++ 編譯時遇到的變數轉換錯誤

作者: Kanyahi (狼爵々)   2016-04-26 17:50:42
開發平台(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):
還請各位先進不吝指教,謝謝
如果有違背版規的地方,請告知,會立即修改
作者: kiedveian (極地之星光)   2016-04-26 21:05:00
#include <windows.h> ?
作者: james732 (好人超)   2016-04-26 22:34:00
google找那兩個東西,應該能找到需要加入哪些.h檔吧?
作者: TeaEEE (愛不趴 不愛趴)   2016-04-27 13:03:00
這二個應該是uni-code,Vc6有支援uni-code嗎?
作者: colako (凱風快晴)   2016-04-27 13:50:00
VC6沒_s,試試改用_snwprintf,不輸入dwBufferLength?沒有CT2CA macro...就自己想別的辦法轉嘍?

Links booklink

Contact Us: admin [ a t ] ucptt.com