Greetings,
Would anyone suggest or suggest against using fflush(fp) before
fclose(fp)? Are there any advantages to using or not using it? TIA!
Example:
void save_corpses( void )
{
FILE * fp;
CORPSE_DATA * c;
fclose( fpReserve );
if ( ( fp = fopen( CORPSE_FILE, "w" ) ) == NULL )
{
bug( "save_corpses :: " CORPSE_FILE " not found.", 0 );
}
else
{
for( c = corpse_list; c != NULL; c = c->next )
{
fwrite_obj( NULL, c->corpse, fp, 0 );
}
fprintf( fp, "#END\n" );
fflush( fp );
fclose( fp );
}
fpReserve = fopen( NULL_FILE, "r" );
return;
}
Keith Mervine
"Non Omnis Moriar"
"Growing old is mandatory, growing up is optional"
Service Management Application Developer
International Monetary Fund
[EMAIL PROTECTED]
202-623-7610