Hi, I am looking for a good, fast method for communication between two c++ programs. I am making a 3D mouse pointer and need to send the three coordinates to another program that presents them graphically. At the moment I am using a file, but opening and closing a little file up to 40 times per second cant be ideal...
At the moment it looks like this:
Code to send coordinates in Prog1:
(x, y, z are doubles)
fout << x << " " << y << " " << z;
fout << flush;
Code to recieve coordinates in Prog2:
Any better ideas?
fin >> X >> Y >> Z;
My googling before finding this forum suggested me sockets or pipes, but I cant get it working. Any example is welcome!
EDIT: I am using Windows XP and Visual Studio 2005