// // Print out the number of records in the database. // void BtRecExample::stats() { DB_BTREE_STAT *statp; dbp->stat(NULL, &statp, 0); cout << progname << ": database contains " << (u_long)statp->bt_ndata << " records\n"; // Note: must use free, not delete. // This struct is allocated by C. // free(statp); }