[英]Write padding bytes ('0') with a function that takes a pointer and a length as arguments
I have a Stream object with a Write(const void *P, size_t size)
function. 我有一个带有Write(const void *P, size_t size)
函数的Stream对象。 I want to call it to write n Bytes of '0'
. 我想称它为n字节写入'0'
。 How would I do that without having to initialize a dummy unsigend char
array with 0
and handing a pointer to the Write()
function? 我如何做到这一点而不必用0
初始化虚拟unsigend char
数组并将指针传递给Write()
函数?
您可以通过调用Write()
之外的其他函数来实现此目的,该函数显然无法满足您的要求。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.