well, the contents will never be saved then..
you see if i open the file and write to it in a while(1) loop.. the file will never be closed and i will lose whatever i wrote..
Well, does it work? If so, then it's probably ok :) I don't see anything that's gonna cause your computer to blow up.
In all reality, the call to flush isn't even necessary. It gets called on it's own when the buffer gets full, or the stream closes. But, I think it's more of a safety thing, in case the program crashes for some reason.
Yes it works fine, i am thinking about flushing the stream after specific time intervals for safety because i can never be sure when the buffer gets full.
thank you for your help sir.