Another bug that is probably not the source of your problem but should be noted:
int i, m = 0, n, k;
card *arr = new card[i];
This allocates an array of random size, because
i
is not initialized. Your compiler should generate a warning message. If not, increase the compiler warning level.
You may use the file size divided by the structure size to get the number of structures stored in the file and use this as array size.