I've got a piece of code for myfopen.
Myfile * myfopen(){
Myfile * file = (Myfile*) malloc(sizeof (Myfile));
memmove(file->buffer.data, disk[79].data, blocksize);
file->pos = 0;
return file;
that gets whatever is in diskblock 79. How would i change that to make it get the data from any postion the user selects? i.e.
Myfile * myfopen(const *char path, const char * mode){
Myfile * file = (Myfile*) malloc(sizeof (Myfile));
memmove(file->buffer.data, (path,mode) blocksize);
file->pos = 0;
return file;
but that doesn't work. Does anyone know the answer to this? i need something instead of the bit in bold. Cheers for any help.