Here is my code as of now:
#include <stdio.h>
#include "readwrite.h"
int main ()
{ FILE* pFile;
char buffer[] = {'x' ,'y','z',0};
pFile = fopen("C:\\Test\\myfile.bin","wb");
if (pFile ){
fwrite(buffer,1,sizeof(buffer),pFile);
printf("The buffer looks like: %s",buffer);
}
else
printf("Can't open file");
fclose(pFile);
getchar();
return 0;
}
I'm trying to write something verify i wrote to the file and then read from the file and verify i read from the file. How best is there to do this? I also need to figure out a way to write the same thing to 2 different files. Is this even possible?