开发者

Print pointervalue

I 开发者_开发问答have char* data; which has a buffer dumped into it. I want to view the content of this char*. I do not know the size of this pointer data so How do I print it?! Thank you


Assuming the char* is NUL-terminated, use printf("%s\n",data);.

If the data are not NUL-terminated, this may cause a segmentation fault.

If your data have some format other than ASCII characters, you're going to need to write some code to print it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜