I am trying to communicate between two processes. I am trying to save data(like name, phone number, address) to shared memory in one process and trying to print that data th
You should be reserving enough shared memory to exchange the data. Processes aren't supposed to access each others memory, even if using shared pointers. Keep in mind only the raw data you write during runtime is shared, there's no type checking or any other metadata passed. You can use a common structure, if your data allows it using fixed-size arrays, to access the data more easily. Otherwise, you'll have to manually marshal the data between the processes.