calling string between two terminals

Hi, I would like to put a string in one terminal and call it from another.

how would i put this "string x = "hello world";" line in one terminal and print it out in another terminal. like "cout x" in another terminal.
closed account (48bpfSEw)
What do you mean with "terminal"? A display on a remote or an other computer?

closed account (48T7M4Gy)
http://www.cplusplus.com/forum/beginner/195238/
closed account (E0p9LyTq)
Necip wrote:
What do you mean with "terminal"? A display on a remote or an other computer?

The OP is wanting interprocess communication between two separately running apps.

@badboy1245,

Please do NOT double post. Close out one of your posts so people inclined to help you (and those wanting to learn from your question) post info in only one place.
closed account (48bpfSEw)
thank you furryguy, there are two interprocess commincation techniques I've used in my live: "named pipe" and "shared memory".
closed account (48bpfSEw)
One of the simpliest way for interprocess commincation is to use a SQL Server!

All you need is a table with following fields:

TimeStemp, Sender, Receiver, HandShakeCode, Data (binary)

Client A starts the commincation by inserting a record to this table, name it "IPC", with this values:

10:00:00, Client A, Client B, ARE YOU READY TO RECEIVE DATA, NULL

Client B, C, D... are listening each 10 seconds on this table if they have a message (Receiver = Client B)

If they find a message for themself the respond to the sender by updating this record with

10:00:10, Client B, Client A, YES SEND ME THE FIRST PACKAGE, NULL

The Client A listens every 10 seconds too if it has a post from any client. If so it processes the next step in the protocoll.


Hope you cought the idea behind this simple trick! ^^ With this method the processes can communicate beyond the borders of operating systems and programming languages.
Topic archived. No new replies allowed.