Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/152.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++ 将char[]变量转换为uintpttr t变量C++;_C++ - Fatal编程技术网

C++ 将char[]变量转换为uintpttr t变量C++;

C++ 将char[]变量转换为uintpttr t变量C++;,c++,C++,我有一个带有地址的char[]类型的变量。示例:char addr[11]=“0x01234567”;。如何将此变量转换为uintptr\t类型 我希望它等效于uintpttr\u t add=0x01234567“0x01234567”是整数的文本表示形式std::uintptr\u t是一个整数类型。您可以使用任何标准格式的输入函数进行转换。有几个选项,但我建议从字符串流开始。我希望它等效于:uintpttr\u t add=0x01234567;很好,谢谢。我发现sstream,一切正常!

我有一个带有地址的char[]类型的变量。示例:char addr[11]=“0x01234567”;。如何将此变量转换为uintptr\t类型


我希望它等效于
uintpttr\u t add=0x01234567

“0x01234567”
是整数的文本表示形式
std::uintptr\u t
是一个整数类型。您可以使用任何标准格式的输入函数进行转换。有几个选项,但我建议从字符串流开始。

我希望它等效于:uintpttr\u t add=0x01234567;很好,谢谢。我发现sstream,一切正常!