Im making a program that will take a input file specified on the command line through argv and a output file also specified on the command line argv, basically im just printing the information from the input file to the output file in ascii format zero padded, Im using fread to read the entire file into a dynamically allocated block of memory, I use fseek and ftell to get the size of the input file, and then use a loop to print the values to the output file, but somehow when I increment the pointer to move to the next byte in the allocated memory space. it gives me the _CrtIsValidHeapPointer(pUserData), Debug Assertion Error!
Here is the following code for my program, please help me out in anyway possible, thank you! It still is correctly writing to the output file the values from the input file, but it's giving me that error.
main(int argc,char* argv)
fseek( ipf,0, SEEK_END );