Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果内存之间可以有空字符,我需要做什么来打印内存的内容。假设我有一个地址 0X123。我想在内存中的这个地址之前打印大约 100 个字符,中间可能有一些 NULL 字符,我也想打印那些 NULL 字符。
使用未格式化的输出:
cout.write(address, count);
或者对于 C:
fwrite(address, 1, count, stdout);