Untitled

Posted on March 10, 2010, 5:11 am UTC anonymously (about 1 year ago)

Code (highlighted for Text)

  1. ad/filter file
  2.  19     char line[80];
  3.  20     while(fgets(line, 80, in) != NULL){
  4.  21         inventoryItemFromString(line);
  5.  22     }
  6.  23
  7.  24     //Close file streams
  8.  25     fclose(in);
  9.  26     fclose(out);
  10.  27
  11.  28 }
  12.  29
  13.  30 Inventory inventoryItemFromString(char *string){
  14.  31     char *pch = strtok(string," ");
  15.  32     Inventory invl;
  16.  33     do {
  17.  34         printf(">%s",pch);