I am writing a binary file like this:
Now how can i again write given binary file obj_pattern.bin with some new values of ad[i] in another program. For example in first program i put ad[] values in the file as 1,2 now how can i again write that same file without deleting the previous saved values 1 and 2?Code:const int sized = 300000000ULL; int ad[sized]; ... ad[i] = some value; ... FILE* pFile; pFile = fopen("obj_pattern.bin", "wb"); fwrite(ad, 1, sized*sizeof(int), pFile); fclose(pFile);




Reply With Quote
