I m wondering, can you make a pointer to a group of variables in an array? like this
array[20]{ a , b , c ,...}
pointer = array[6 through 10];
因此,你可以说......
*pointer[0] == array[6];
以及
*pointer[5] == array[10];
以及the length of *pointer
5 == sizeof(*pointer) sizeof(type);
OK
Let me explain what I m trying to accomplish, maybe that will clear me up a bit. I want to read a full file into a buffer, but I want to do it piece by piece. passing a small array into read() 以及then looping it into the larger array defeats the purpose. I was hoping that I could directly point to an area in the buffer I want to fill, 以及pass that to the read() function.
I DO NOT want to use streams or anything that buffers behind my back
这样做会适得其反,因为我试图一劳永逸地阅读整个档案。 尽可能快。