I am writing an application that will read data coming in through a serial port (RS232) and write that data to a file. This file will then be parsed by a php script and the data will uploaded to a server. Is there a function that allows me to make the file auto-update after each data input?
If this is unclear, let me shed some light. Say you write a piece of data to a file using the << operator with a variable of type ofstream. If you open the file while the application is running, it will show the last data that was input. If you input another piece of data, it will prompt you to "reload" the file to be able to see the new data input. Is there a way to do this automatically so the application does not have to be shutdown every so often? This would also allow the php script to run non-stop as well.