Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/visual-studio-2010/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ __int64将输出格式化为十六进制_C++_Visual Studio 2010_Visual C++_Mfc - Fatal编程技术网

C++ __int64将输出格式化为十六进制

C++ __int64将输出格式化为十六进制,c++,visual-studio-2010,visual-c++,mfc,C++,Visual Studio 2010,Visual C++,Mfc,我想将uu int64 type参数转换为CString。但我总是得到错误的输出。 这是我的密码: __int64 = offset;//non zero CString strOutput; strOutput.Format(_T("0x%x"), offset); 错误的输出为:0x0 有人能帮我吗?试试这个: strOutput.Format(_T("%I64d"),offset); 试试这个 strOutput.Format(_T("0x%I64X"), offset); 试试这个

我想将uu int64 type参数转换为
CString
。但我总是得到错误的输出。 这是我的密码:

__int64 = offset;//non zero
CString strOutput;
strOutput.Format(_T("0x%x"), offset);
错误的输出为:0x0

有人能帮我吗?

试试这个:

strOutput.Format(_T("%I64d"),offset);
试试这个

strOutput.Format(_T("0x%I64X"), offset);
试试这个:

strOutput.Format(_T("0x%llx"), offset);
或者更好,如果你能
#包括


我不认为那是十六进制。是吗?编辑:不,不是,但这是对OP的问题“我想将_int64 type参数转换为CString”的回答(这不是我的问题。。。我的问题是:我不认为那是十六进制。是吗?
strOutput.Format(_T("0x%"PRIx64""), offset);