Under windows, getting the file open by two programs is a matter of using file sharing modes. The 'reader' would commonly "deny none" the 'updater' would commonly 'deny write'.
The only real concern I have is whether or not the two programs need to interact at all. How does the reader know when all of the data has been read, or does it keep trying to read in case the updater puts more data into the file?
If the second case:
How does the reader know when the data is complete?
How does the reader know that it is 'done'?
Make sure you plan that the reader might be able to get a 'partial' record from the updater. It is possible that the processor might swap from one app to the other before the record is completely written.
For file sharing, look at "FileShare Enumeration" for .Net in MSDN
If you're planning to implement this in C, you're posting in the wrong forum. (I personally use the forum you posted your message into as a guide into how to answer the question.)
I'd have to go back and see what fgets() would do if it reached the 'end of file' without seeing a '\n'. I think it will still fetch the data from the file. As far as the reader program is concerned, the file does not have (and will not have) any more data. The libraray is not aware that more data will be written. You might even have to call some form of reset (to clear the EOF / error status) on the file in the reader to get it to read more data afterward.
Remember that just because fgets() did not return NULL does NOT mean that it read a complete input line. (It is possible for fgets to return with a partial line of data if there is a partial line of data at the end of the file.)
Need some help with this Array. I am trying to get the sum of the even numbers and the sum of the odd numbers using a for each loop. I know the answers to what I am trying to achive are sum of even = 84 and the sum of ...
I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...