1
我有這樣的代碼:如何從Windows的C命令行讀取unicode和數字參數?
#include "stdafx.h"
#include <windows.h>
#include <conio.h>
int _tmain(int argc, _TCHAR* argv[])
{
LPCTSTR f = argv[1];
DWORD n = atoi(argv[2]);
return 0;
}
我想讀一個unicode字符串和一個數字。這就是我得到後,我編譯:
錯誤C2664: '的atoi':不能從轉換參數1 '_TCHAR *' 到 '爲const char *'
hehehe和''是非常標準的,我猜:P我的意思是......不是標準是沒有理由避免包括它 –
pmg
2011-03-13 14:01:21