void File::WritePage(Page &page) { int buffer[Page::PAGE_NUM]; int count = 0; int tmp = page.GetAndPopFront(); while (tmp != -1) { buffer[count] = tmp; count ++; tmp = page.GetAndPopFront(); } fwrite(buffer, sizeof(int), count, f_); }