Yes, but you need to provide the correct size. On line 11 you provide the size for a single object.
I think the code is correct in that respect. The fread() is reading n objects of size sizeof(detail).
But it's reading it into the wrong place:
1 2 3 4 5
struct detail *mv;
...
mv = new detail[n];
...
fread((char*)&mv, sizeof(detail), n, f); //I think the error occurs here
The fread is storing the data at mv's address. In other words, it's overwriting the pointer itself (and a whole lot more). You want to store the data in the location that mv points to:
fread(mv, sizeof(detail), n, f);
No need to cast to a char* since fread expects a void* as its first argument and any pointer will cast automatically to void*