它的时间结束了,但无论如何我想完成这个问题。我想将二进制文件读取到缓冲区,然后我想将此缓冲区复制到数组。我正在这样做;
int i=0;
char *buffer;
buffer=(char *)malloc(filelen+1); //filelen is length of binary file
while()
{
fread(buffer,100,1,filepointer); //filepointer is input binary file pointer,i wanna read 100 byte
strcpy(tup[i],buffer); //tup[] is char array.i want copy buffer to in this array
i++;
}
我在 strcpy 行遇到错误,您无法将指针复制到类似的整数。
谢谢。