C++ multiple process shared memory implementation
Here's what I am trying to accomplish.

I want program1 to create a shared memory segment where I store various arrays.

Then, I want program2 to read in the arrays and modify them.

This sounds pretty simple, but for some reason, I cannot find a single example online that shows how this is done. Every example I have found uses a single program (e.g the initialize, read and write are both done by program1).

If somebody can provide an example here, I'm sure this would be hugely beneficial for pretty much everybody that wants to use IPC in C++.
C++ multiple process shared memory implementation
===

Here's what I am trying to accomplish.

I want program1 to create a shared memory segment where I store various arrays.

Then, I want program2 to read in the arrays and modify them.

This sounds pretty simple, but for some reason, I cannot find a single example online that shows how this is done. Every example I have found uses a single program (e.g the initialize, read and write are both done by program1).

If somebody can provide an example here, I'm sure this would be hugely beneficial for pretty much everybody that wants to use IPC in C++.