int main () { int max; /* max length seen so far*/ char line[MAXLINE]; /* current input line */ char longest[MAXLINE]; /* longest line save here */ max = 0; FILE *fr = NULL; FILE *fw = NULL; fr = fopen ("at.txt", "r"); fw = fopen ("wt.txt", "w"); if (fr == NULL || fw == NULL) { printf ("\nFile can't open !"); exit (0); } while((getLine(line, MAXLINE, fr)) > 0) { if (atRemove(line) > 0) { fputs(line, fw); printf ("\nLine = %s\n", line); } } // close file fclose (fr); fclose (fw); return 0; }
void TNSCollection::atFree( ccIndex index ) { void *item = at( index ); atRemove( index ); freeItem( item ); }
void TNSCollection::remove( void *item ) { atRemove( indexOf(item) ); }