Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hi.
I am something of a C++ novice, I understand the basic principles such as classes, inheritance e.t.c, but that's about it.
What I need to do is have a program pass a variable (a bit stream) to another program in real-time. I have searched the web, but can't seem to find any easily-accessible tutorials on the subject. If anyone could either link me to such a tutorial if one exists, or just point me in the right direction, I would appreciate it.
Thanks,
Nil

If want to share data with a program that you have made, them using multiple threads may be what you need.
http://www.linuxdocs.org/HOWTOs/C++...
If you are working with the Win32 API then look up processes in the Win32 help reference. Win32 has some functions for piping data between processes I believe.
If you want to share data with an existing program that you don't have souce code for then it probably aint gonna happen.If you could post more deteailed information someone here might be able to steer you in the right direction.

It might be kindof slow, but you could possibly use a TCP socket to send/receive data between the programs.
Alternately you could have program 1 dump a file that contains the data the other needs and have prog 2 open/read from it.
When using Linux (and possibly windows) you can use pipes between the programs, where one program writes to stdout and the other reads from. The typical structure for something like this would be
% prog2 | prog1 argumentsA real life example is searching dmesg output for something important..
% dmesg | grep ACPI

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |