I have this text file and I need to read it in and copy it to memory, but I am not exactly sure how to do it. Could someone please help me?
I know how to open the file and check to see if it opened properly, but I don't know what to do after setting up the buffer.Code:Block 0 #Stuff = 0x0 #Comments for Block 0 0033FFEEDDCCBBAA 95D3C7F0E9343A13 238D9A0CE94B3457 EOB 0 Block 1 #Stuff = 0x1 #Comments for Block 1 0033FFEEDDCCBBAA 39D347F50B347645 065F6EDE94B04457 EOB 1
Code:unsigned char *buffer; buffer = (char *)malloc(size_of_file); if (buffer == NULL) // Error // now what???? free(buffer); fclose(dFile);