Is it possible to somehow read into a position in an array? instead of just reading into the beginning of an array.
e.g.
EDIT: sorry! I must be tiredCode:/* read 1000 bytes into array, beginning at 0 */ fread(array, 1, 1000, file); /* read 1000 bytes into array, beginning at pos */ fread2(array[pos], 1, 1000, file);already knew the answer, lol
Last edited by kenna; 08-17-2007 at 06:39 AM.
Missing an ampersand there, you're going to be reading to the value in that array pos.
Code:fread(array + pos,1,1000,file); //Alternatively fread(&array[pos],1,1000,file);
Sorry to rain on your parade, but this thread is from 2007, and the original poster already fixed his problem.
Root Beer == System Administrator's Beer
Download the new operating system programming kit! (some assembly required)
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks