Code:
while(!pile.eof()){
         pile.getline(inputbuff,199,'\n');
         count++;
      if(count % 2 != 0){
           tok = strtok(inputbuff,",");
               tok = strtok (NULL,",");
           tok = strtok (NULL,",");
      }
      if(count % 2 == 0){
          CopyFile(inputbuff,ptr);
      }
    }
the loop iterates the first time through qualifying for (count % 2 != 0)
because count is at 1
so it stores the characters after the comma into tok and does it successfully according to my debugger.
then the while itterates again because it doesn't qualify for the next if.
this time it does qualify for count % 2 == 0
but my tok pointer is now null , how can that be? does it go null when the while loop itterates for the second time? that shouldn't be because my integer count doesn't reset? Please help