I tried to write two programs that communicates with each other through fstreams directer to the same file. It works.
But here comes a question - are there other ways? Streams are quite slow, and while fstreams work faster than standard input/output streams, I thought maybe there are some other, better ways?
Maybe there is a way to directly tie output stream of one file with the input stream of another?
I heard you can do that with sockets and its probably faster, but I'm quite a novice when it comes to programming, and those seem a fair bit above my level of skill and experience.
Here is a simplified version of what I did, if you didn't get what I mean: