so here's the deal...i'm currently working on a multiprocessing program (using fork()) with C, and i pretty much have everything working except this last problem 
so, the process that's not working properly simply reads strings from a text file, uses strtok to extract all the numbers and throw them into two variables (since there are two integer numbers in each string), but I want to rewrite the text file with the original argument as well as the answer (ie. if the string says "5 + 3" it should rewrite "5 + 3 = 8").
rewind() sends the pointer to the beginning of the file, so that's no good...how would I send the pointer to the beginning of the line?
If I use rewind(), it writes to the file the way I want it to but as mentioned earlier it keeps processing the first line...
If I don't use rewind the output to the screen is correct, but nothing's being rewritten to the files..
so, the process that's not working properly simply reads strings from a text file, uses strtok to extract all the numbers and throw them into two variables (since there are two integer numbers in each string), but I want to rewrite the text file with the original argument as well as the answer (ie. if the string says "5 + 3" it should rewrite "5 + 3 = 8").
rewind() sends the pointer to the beginning of the file, so that's no good...how would I send the pointer to the beginning of the line?
If I use rewind(), it writes to the file the way I want it to but as mentioned earlier it keeps processing the first line...
If I don't use rewind the output to the screen is correct, but nothing's being rewritten to the files..
