本文介绍了指向字符串然后返回64位计算机上的指针。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将指针地址打印到字符串缓冲区然后在64位计算机上读取它?

强制是使用字符串(char * buffer)只有。


使用%d打印时不会捕获指针的完整64位。

确实在printf和scanf中都存在%l目的?

How do I print a pointer address into a string buffer and then read it
back on a 64 bit machine ?
Compulsion is to use string (char * buffer) only.

printing with %d does not capture the full 64-bits of the pointer.
does %l exist in both printf and scanf for this purpose ?

推荐答案




那个''因为%d不是指针,%p是。


-

Ian Collins。

That''s because %d isn''t for pointers, %p is.

--
Ian Collins.



这篇关于指向字符串然后返回64位计算机上的指针。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-04 19:33
查看更多