Here is my code,
char buf[1];
int count=0;
while( Read(fileID, buf, 1)==1)
{
contents = (char *)realloc(contents,(iVal+1)*sizeof(char));
contents[count]=buf[0];
count++;
}
Now that I can not use libc, how would I do the reallocation. The problem is that I do not know the size of the file I am reading so I have reallocate. The same problem exists with malloc as well.