473,395 Members | 2,079 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Pass data between C++ programs

Hi Group,
I hope I got into the right place. If I have two different C++
programs (exe). Is there anyway I can pass data (numbers, strings,
etc) between the 2 programs (without combining into 1 exe)? They are
supposed to work "live", e.g. one prog picking up data from a device
and then pass it to the other prog that will analysis or use the data
for animation. And, how to do that? They are developed by two
different people, so I do not wish to combine the two programs into
one, but would be good to use one of their methods to do the work.
Any help will be appreciated.
Regards
Hong
Jul 22 '05 #1
3 4249
Hong wrote:
I hope I got into the right place. If I have two different C++
programs (exe). Is there anyway I can pass data (numbers, strings,
etc) between the 2 programs (without combining into 1 exe)?
Write them to a file and read the file in the other program. There
is no other way in the standard C++. All other ways are platform-
specific (shared memory, sockets, etc.)

C++ does not define interaction between processes. The language is
defined as if every program executes by itself under some kind of
"virtual machine". Inter-process communication is part of the OS (if
the OS supports the notion of a "process").
[...]


Post to a newsgroup dedicated to your OS.

Victor
Jul 22 '05 #2
ow*@ieee.org (Hong) wrote in message news:<77*************************@posting.google.c om>...
Hi Group,
I hope I got into the right place. If I have two different C++
programs (exe). Is there anyway I can pass data (numbers, strings,
etc) between the 2 programs (without combining into 1 exe)? They are
supposed to work "live", e.g. one prog picking up data from a device
and then pass it to the other prog that will analysis or use the data
for animation. And, how to do that? They are developed by two
different people, so I do not wish to combine the two programs into
one, but would be good to use one of their methods to do the work.
Any help will be appreciated.
Regards
Hong


I take it you can modify both programs. If that is correct, you might
be interested in the online C++ middleware generator available at
http://www.webebenezer.net. If you send the following input:

Messages
(list<int>)
(string, string)
}

as a "Middle" file, you will get a C++ class back. The class will
have
functions that send and receive instances of the types given in the
input.
You have to be careful about byte ordering when using the generated
code. (We have added support for char* and single inheritance, but
it isn't available yet on the web site. If things go as expected,
we'll update the site by the end of the month.)

Brian Wood
Jul 22 '05 #3
ow*@ieee.org (Hong) wrote in message news:<77*************************@posting.google.c om>...
Hi Group,
I hope I got into the right place. If I have two different C++
programs (exe). Is there anyway I can pass data (numbers, strings,
etc) between the 2 programs (without combining into 1 exe)? They are
supposed to work "live", e.g. one prog picking up data from a device
and then pass it to the other prog that will analysis or use the data
for animation. And, how to do that? They are developed by two
different people, so I do not wish to combine the two programs into
one, but would be good to use one of their methods to do the work.
Any help will be appreciated.
Regards
Hong


Using a socket is one way to do this...

Guido
Jul 22 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

38
by: Radde | last post by:
HI all, Whats the difference b/w pass by ref and pass by pointer in C++ when ur passing objects as args.. Cheers..
2
by: socket | last post by:
Hey, I need to make two programs I wrote to communicate with each other, but what's the best way to implement it? Both programs will be running on the same machine. I don't want to open sockets...
5
by: equip200 | last post by:
i would like some assistance on how to pass data or string from one vb program to another c# program. can this be done with vbscript code to send data to the c# program? Thanks
4
by: jamy | last post by:
Hi all, I have a piece of code written in c++. I wanted to pass that object to a Cprogram. Can I do that, then how can I access the members of that object from C function.
14
by: Abhi | last post by:
I wrote a function foo(int arr) and its prototype is declared as foo(int arr); I modify the values of the array in the function and the values are getting modified in the main array which is...
31
by: Sam of California | last post by:
Is it accurate to say that "the preprocessor is just a pass in the parsing of the source file"? I responded to that comment by saying that the preprocessor is not just a pass. It processes...
6
by: lisp9000 | last post by:
I've read that C allows two ways to pass information between functions: o Pass by Value o Pass by Reference I was talking to some C programmers and they told me there is no such thing as...
12
by: raylopez99 | last post by:
Keywords: scope resolution, passing classes between parent and child forms, parameter constructor method, normal constructor, default constructor, forward reference, sharing classes between forms....
1
by: dotnetnovice | last post by:
Hi everybody... I want to show data in the data gridview placed in my form after getting data from my data access layer class through a class... Here is my code in the data access layer class....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.