FILE* file1; // not 'file'
file1=fopen("temp.dat","r+b"); // not '+rb'
// fread(*file,1,1,size()); is wrong
// see the following for correct usage.
Declaration:
size_t fread(void *ptr, size_t size, size_t nmemb, FILE *stream);
Reads data from the given stream into the array pointed to by ptr. It reads nmemb number of elements of size size. The total number of bytes read is (size*nmemb).
On success the number of elements read is returned. On error or end-of-file the total number of elements successfully read (which may be zero) is returned.