In this topic Two variables in one shared memory , you can see how to put 2 variables into one shared memory in C.
However, I want to put multiple variables into one shared memory using MapViewOfFile function. But there's no example or solution I've found. Types of variables are different so I can't use std::vector nor array.
How should I set arguments of CreateFileMapping and MapViewOfFile to do this? How can I get and set an address in FileMapping which I want to read and write a variable?
It shouldn't be needed that I have to create a FileMapping for each variables, right?