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.
加载中,请稍侯......
精彩评论